Go to the documentation of this file.
214 #ifndef functionObjects_surfaceFieldValue_H
215 #define functionObjects_surfaceFieldValue_H
231 class sampledSurface;
234 namespace functionObjects
236 namespace fieldValues
243 class surfaceFieldValue
361 void setFaceZoneFaces();
364 void setPatchFaces();
367 void combineMeshGeometry
374 void combineSurfaceGeometry
381 scalar totalArea()
const;
442 template<
class WeightType>
445 const Field<WeightType>& weightField,
452 template<
class WeightType>
463 template<
class WeightType>
493 bool usesSf() const noexcept;
502 template<class WeightType>
517 const
word& fieldName,
518 const
bool mandatory = false
522 template<class Type, class WeightType>
527 const
Field<WeightType>& weightField
532 template<class Type, class WeightType>
537 const
Field<WeightType>& weightField
556 template<class WeightType>
560 const
Field<WeightType>& weightField,
566 template<class Type, class WeightType>
569 const
word& fieldName,
571 const
Field<WeightType>& weightField,
662 const
Field<scalar>& weightField,
670 const
Field<scalar>& weightField,
679 const
Field<scalar>& weightField,
712 #include "surfaceFieldValueI.H"
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
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.
bool is_weightedOp() const noexcept
True if the operation variant uses a weight-field.
A class for handling file names.
bool canWeight(const Field< WeightType > &fld) const
True if field is non-empty on any processor.
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.
Mesh data needed to do the Finite Volume discretisation.
Mesh data needed to do the Finite Volume discretisation.
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.
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
List< bool > boolList
A List of bools.
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.
regionTypes regionType() const noexcept
Return the region type.
Calculate with function object surface.
List< word > wordList
A List of words.
Registry of regIOobjects.
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.
const dictionary & dict() const noexcept
Return the reference to the construction dictionary.
bool is_magOp() const noexcept
True if the operation variant uses mag.
bool withTopologicalMerge() const noexcept
Can use mesh topological merge?
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.
wordRes selectionNames_
Extended selections.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
scalar totalArea_
Total area of the surfaceFieldValue.
Average using abs weighting.
TypeName("surfaceFieldValue")
Declare type-name, virtual type (with debug switch)
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 boolList & faceFlip() const noexcept
Return the local true/false list representing the face flip map.
OBJstream os(runTime.globalPath()/outputName)
const objectRegistry & obr() const
The volume mesh or surface registry being used.
static tmp< scalarField > weightingFactor(const Field< WeightType > &weightField, const bool useMag)
Weighting factor.
const labelList & faceId() const noexcept
Return the local list of face IDs.
labelList facePatchId_
Local list of patch ID per face.
virtual void movePoints(const polyMesh &mesh)
Update for changes of mesh.
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.
const word & name() const noexcept
Return the name of this functionObject.
bool writeArea_
Optionally write the area of the surfaceFieldValue.
static const Enum< operationType > operationTypeNames_
Operation type names.
List< face > faceList
A List of faces.
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)
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)
static tmp< scalarField > areaWeightingFactor(const Field< WeightType > &weightField, const vectorField &Sf, const bool useMag)
Weighting factor, weight field with area factor.
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.
bool usesSf() const noexcept
True if the operation needs a surface Sf.
const labelList & facePatch() const noexcept
Return the local list of patch ID per face.