87#ifndef Foam_functionObjects_nearWallFields_H
88#define Foam_functionObjects_nearWallFields_H
146 PtrList<volScalarField>
vsf_;
147 PtrList<volVectorField>
vvf_;
149 PtrList<volSymmTensorField>
vSymmtf_;
150 PtrList<volTensorField>
vtf_;
218 virtual bool write();
Info<< nl;Info<< "Write faMesh in vtk format:"<< nl;{ vtk::uindirectPatchWriter writer(aMesh.patch(), fileName(aMesh.time().globalPath()/vtkBaseFileName));writer.writeGeometry();globalIndex procAddr(aMesh.nFaces());labelList cellIDs;if(UPstream::master()) { cellIDs.resize(procAddr.totalSize());for(const labelRange &range :procAddr.ranges()) { auto slice=cellIDs.slice(range);slice=identity(range);} } writer.beginCellData(4);writer.writeProcIDs();writer.write("cellID", cellIDs);writer.write("area", aMesh.S().field());writer.write("normal", aMesh.faceAreaNormals());writer.beginPointData(1);writer.write("normal", aMesh.pointAreaNormals());Info<< " "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.time().globalPath()/(vtkBaseFileName+"-edges")));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
Generic GeometricField class.
A HashTable similar to std::unordered_map.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
Samples near-patch volume fields within an input distance range.
scalar distance_
Distance away from wall.
HashTable< word > reverseFieldMap_
From resulting back to original field.
virtual ~nearWallFields()=default
Destructor.
autoPtr< mapDistribute > getPatchDataMapPtr_
Map from cell based data back to patch based data.
PtrList< volScalarField > vsf_
List< Tuple2< word, word > > fieldSet_
Fields to process (input-name output-name).
List< List< point > > cellToSamples_
From cell to tracked end point.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
labelListList cellToWalls_
From cell to seed patch faces.
void calcAddressing()
Calculate addressing from cells back to patch faces.
void createFields(PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const
Create the local fields.
void sampleBoundaryField(const interpolationCellPoint< Type > &interpolator, GeometricField< Type, fvPatchField, volMesh > &fld) const
Override boundary fields with sampled values.
PtrList< volTensorField > vtf_
TypeName("nearWallFields")
Runtime type information.
void sampleFields(PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const
Sample the fields.
PtrList< volSymmTensorField > vSymmtf_
nearWallFields(const word &name, const Time &runTime, const dictionary &dict)
Construct for given objectRegistry and dictionary.
nearWallFields(const nearWallFields &)=delete
No copy construct.
PtrList< volVectorField > vvf_
virtual bool execute()
Execute the function-object operations.
PtrList< volSphericalTensorField > vSpheretf_
void operator=(const nearWallFields &)=delete
No copy assignment.
virtual bool write()
Write the function-object results.
labelList patchIDs_
Patches to sample.
HashTable< word > fieldMap_
From original field to sampled result.
Given cell centre values and point (vertex) values decompose into tetrahedra and linear interpolate w...
A class for handling words, derived from Foam::string.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.