Go to the documentation of this file.
215 #ifndef functionObjects_surfaceFieldValue_H
216 #define functionObjects_surfaceFieldValue_H
232 class sampledSurface;
235 namespace functionObjects
237 namespace fieldValues
244 class surfaceFieldValue
362 void setFaceZoneFaces();
365 void setPatchFaces();
368 void combineMeshGeometry
375 void combineSurfaceGeometry
382 scalar totalArea()
const;
442 const objectRegistry&
obr()
const;
470 template<
class WeightType>
485 const word& fieldName,
486 const bool mandatory =
false
490 template<
class Type,
class WeightType>
500 template<
class Type,
class WeightType>
526 template<
class WeightType>
535 template<
class WeightType>
544 template<
class WeightType>
554 template<
class Type,
class WeightType>
616 virtual bool write();
Area integral using abs weighting.
Weighted uniformity index.
List< label > labelList
A List of labels.
vectorField pointField
pointField is a vectorField.
operationType operation_
Operation to apply to values.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
Sum of balance of values in given direction.
A class for handling words, derived from Foam::string.
A class for handling file names.
A class for managing temporary objects.
operationType
Operation type enumeration.
virtual bool read(const dictionary &dict)
Read from dictionary.
postOperationType
Post-operation type enumeration.
Operation returns a scalar.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Operation using weighting.
Type processSameTypeValues(const Field< Type > &values, const vectorField &Sf, const Field< WeightType > &weightField) const
Apply the 'operation' to the values. Operation must preserve Type.
const dictionary & dict() const
Return the reference to the construction dictionary.
bool usesSf() const
True if the operation needs a surface Sf.
const boolList & faceFlip() const
Return the local true/false list representing the face flip map.
List< bool > boolList
A List of bools.
bool canWeight(const Field< WeightType > &weightField) const
True if operation variant uses a weight-field that is available.
bool withTopologicalMerge() const
Can use mesh topological merge?
No additional operation after calculation.
postOperationType postOperation_
Optional post-evaluation operation.
wordList weightFieldNames_
Weight field name(s) - optional.
Area average using abs weighting.
Uniformity index (output is always scalar)
tmp< Field< Type > > filterField(const GeometricField< Type, fvsPatchField, surfaceMesh > &field) const
Filter a surface field according to faceIds.
Uniformity index using abs weighting.
Sample onto surface and calculate.
Calculate with faceZone(s)
static const Enum< regionTypes > regionTypeNames_
Region type names.
label writeAll(const vectorField &Sf, const Field< WeightType > &weightField, const pointField &points, const faceList &faces)
Templated helper function to output field values.
regionTypes regionType_
Region type.
Mesh consisting of general polyhedral cells.
surfaceFieldValue(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
Calculate with function object surface.
List< word > wordList
A List of words.
Registry of regIOobjects.
tmp< scalarField > weightingFactor(const Field< WeightType > &weightField) const
Weighting factor.
bool withSurfaceFields() const
Can the surface definition sample surface-fields?
bool update()
Update the surface and surface information as required.
Operation using mag (eg, for weighting)
autoPtr< surfaceWriter > surfaceWriterPtr_
Surface writer.
Sum in a given direction.
tmp< Field< Type > > getFieldValues(const word &fieldName, const bool mandatory=false) const
Return field values by looking up field name.
virtual void updateMesh(const mapPolyMesh &mpm)
Update for changes of mesh.
Area integral in normal direction (output is always scalar)
regionTypes
Region type enumeration.
regionTypes regionType() const
Return the region type.
wordRes selectionNames_
Extended selections.
scalar totalArea_
Total area of the surfaceFieldValue.
Average using abs weighting.
TypeName("surfaceFieldValue")
Declare type-name, virtual type (with debug switch)
bool usesWeight() const
True if the operation variant uses a weight-field.
label nFaces_
Global number of faces.
Coefficient of variation.
labelList faceId_
Local list of face IDs.
Sum of component magnitudes.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const objectRegistry & obr() const
The volume mesh or surface registry being used.
labelList facePatchId_
Local list of patch ID per face.
virtual void movePoints(const polyMesh &mesh)
Update for changes of mesh.
virtual ~surfaceFieldValue()=default
Destructor.
bool validField(const word &fieldName) const
Return true if the field name is known and a valid type.
Component-wise mag after normal operation.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
bool writeArea_
Optionally write the area of the surfaceFieldValue.
void operator=(const surfaceFieldValue &)=delete
No copy assignment.
static const Enum< operationType > operationTypeNames_
Operation type names.
const word & name() const
Return the name of this functionObject.
List< face > faceList
A List of faces.
Templated 3D Vector derived from VectorSpace adding construction from 3 components,...
bool needsUpdate_
Track if the surface needs an update.
Intermediate class for handling field value-based function objects.
virtual void writeFileHeader(Ostream &os)
Output file header information.
A List of wordRe with additional matching capabilities.
Component-wise sqrt after normal operation.
A face regionType variant of the fieldValues function object.
autoPtr< sampledSurface > sampledPtr_
The sampledSurface (when operating on sampledSurface)
const labelList & facePatch() const
Return the local list of patch ID per face.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Area average in normal direction (output is always scalar)
bool usesMag() const
True if the operation variant uses mag.
fileName outputDir() const
Return the output directory.
operationVariant
Bitmask values for operation variants.
virtual bool write()
Calculate and write.
Generic GeometricField class.
bool writeValues(const word &fieldName, const vectorField &Sf, const Field< WeightType > &weightField, const pointField &points, const faceList &faces)
Templated helper function to output field values.
boolList faceFlip_
List representing the face flip map.
Type processValues(const Field< Type > &values, const vectorField &Sf, const Field< WeightType > &weightField) const
Apply the 'operation' to the values. Wrapper around.
static const Enum< postOperationType > postOperationTypeNames_
Operation type names.
const labelList & faceId() const
Return the local list of face IDs.