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>
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,
628 virtual
bool write();
662 const
Field<scalar>& weightField,
670 const
Field<scalar>& weightField,
679 const
Field<scalar>& weightField,
712 #include "surfaceFieldValueI.H" wordList weightFieldNames_
Weight field name(s) - optional.
static const Enum< regionTypes > regionTypeNames_
Region type names.
Area integral in normal direction (output is always scalar)
A class for handling file names.
boolList faceFlip_
List representing the face flip map.
Operation using weighting.
Uniformity index using abs weighting.
Mesh data needed to do the Finite Volume discretisation.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Sum of balance of values in given direction.
bool withSurfaceFields() const
Can the surface definition sample surface-fields?
fileName outputDir() const
Return the output directory.
virtual bool write()
Calculate and write.
Calculate with function object surface.
Component-wise mag after normal operation.
static const Enum< postOperationType > postOperationTypeNames_
Operation type names.
regionTypes regionType() const noexcept
Return the region type.
List< face > faceList
A List of faces.
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
regionTypes
Region type enumeration.
A face regionType variant of the fieldValues function object.
bool update()
Update the surface and surface information as required.
Generic GeometricField class.
virtual bool read(const dictionary &dict)
Read from dictionary.
Component-wise sqrt after normal operation.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
virtual void updateMesh(const mapPolyMesh &mpm)
Update for changes of mesh.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
tmp< Field< Type > > getFieldValues(const word &fieldName, const bool mandatory=false) const
Return field values by looking up field name.
const word & name() const noexcept
Return the name of this functionObject.
const dictionary & dict() const noexcept
Return the reference to the construction dictionary.
Average using abs weighting.
Area average using abs weighting.
const labelList & faceId() const noexcept
Return the local list of face IDs.
TypeName("surfaceFieldValue")
Declare type-name, virtual type (with debug switch)
operationType
Operation type enumeration.
postOperationType
Post-operation type enumeration.
scalar totalArea_
Total area of the surfaceFieldValue.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
postOperationType postOperation_
Optional post-evaluation operation.
const boolList & faceFlip() const noexcept
Return the local true/false list representing the face flip map.
Mesh data needed to do the Finite Volume discretisation.
labelList faceId_
Local list of face IDs.
vectorField pointField
pointField is a vectorField.
Type processSameTypeValues(const Field< Type > &values, const vectorField &Sf, const Field< WeightType > &weightField) const
Apply the 'operation' to the values. Operation must preserve Type.
label writeAll(const vectorField &Sf, const Field< WeightType > &weightField, const pointField &points, const faceList &faces)
Templated helper function to output field values.
Generic templated field type.
regionTypes regionType_
Region type.
A class for handling words, derived from Foam::string.
bool needsUpdate_
Track if the surface needs an update.
labelList facePatchId_
Local list of patch ID per face.
Coefficient of variation.
Sum in a given direction.
bool validField(const word &fieldName) const
Return true if the field name is known and a valid type.
Area average in normal direction (output is always scalar)
virtual void writeFileHeader(Ostream &os)
Output file header information.
Sum of component magnitudes.
tmp< Field< Type > > filterField(const GeometricField< Type, fvsPatchField, surfaceMesh > &field) const
Filter a surface field according to faceIds.
autoPtr< sampledSurface > sampledPtr_
The sampledSurface (when operating on sampledSurface)
static const Enum< operationType > operationTypeNames_
Operation type names.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
A Vector of values with scalar precision, where scalar is float/double depending on the compilation f...
bool withTopologicalMerge() const noexcept
Can use mesh topological merge?
Uniformity index (output is always scalar)
operationVariant
Bitmask values for operation variants.
OBJstream os(runTime.globalPath()/outputName)
Area integral using abs weighting.
wordRes selectionNames_
Extended selections.
bool is_magOp() const noexcept
True if the operation variant uses mag.
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))
autoPtr< surfaceWriter > surfaceWriterPtr_
Surface writer.
List< word > wordList
A List of words.
static tmp< scalarField > areaWeightingFactor(const Field< WeightType > &weightField, const vectorField &Sf, const bool useMag)
Weighting factor, weight field with area factor.
label nFaces_
Global number of faces.
Operation returns a scalar.
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.
const objectRegistry & obr() const
The volume mesh or surface registry being used.
Type processValues(const Field< Type > &values, const vectorField &Sf, const Field< WeightType > &weightField) const
Apply the 'operation' to the values. Wrapper around.
Sample onto surface and calculate.
static tmp< scalarField > weightingFactor(const Field< WeightType > &weightField, const bool useMag)
Weighting factor.
bool is_weightedOp() const noexcept
True if the operation variant uses a weight-field.
No additional operation after calculation.
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.
Mesh consisting of general polyhedral cells.
operationType operation_
Operation to apply to values.
bool canWeight(const Field< WeightType > &fld) const
True if field is non-empty on any processor.
List< label > labelList
A List of labels.
bool writeArea_
Optionally write the area of the surfaceFieldValue.
A class for managing temporary objects.
Registry of regIOobjects.
virtual void movePoints(const polyMesh &mesh)
Update for changes of mesh.
List< bool > boolList
A List of bools.
Operation using mag (eg, for weighting)
An abstract base class with a fat-interface to all derived classes covering all possible ways in whic...
Calculate with faceZone(s)
Weighted uniformity index.