Go to the documentation of this file.
111 #ifndef functionObjects_volFieldValue_H
112 #define functionObjects_volFieldValue_H
121 namespace functionObjects
123 namespace fieldValues
215 const word& fieldName,
216 const bool mustGet =
false
223 const Field<Type>&
values,
239 const word& fieldName,
287 virtual bool write();
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual ~volFieldValue()=default
Destructor.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
bool usesWeight() const
True if the operation variant uses a weight-field.
Volume (cell) region selection class.
A class for managing temporary objects.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
volFieldValue(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
Weighted volume integral.
const dictionary & dict() const
Return the reference to the construction dictionary.
Type processValues(const Field< Type > &values, const scalarField &V, const scalarField &weightField) const
Apply the 'operation' to the values.
Operation using weighting.
virtual bool read(const dictionary &dict)
Read from dictionary.
tmp< Field< Type > > getFieldValues(const word &fieldName, const bool mustGet=false) const
Insert field values into values list.
Coefficient of variation.
operationType operation_
Operation to apply to values.
virtual bool write()
Calculate and write.
operationType
Operation type enumeration.
word weightFieldName_
Weight field name - only used for weighted modes.
Registry of regIOobjects.
bool validField(const word &fieldName) const
Return true if the field name is valid.
Provides a 'volRegion' specialization of the fieldValue function object.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
operationVariant
Bitmask values for operation variants.
virtual void writeFileHeader(Ostream &os) const
Output file header information.
static const Enum< operationType > operationTypeNames_
Operation type names.
bool writeValues(const word &fieldName, const scalarField &V, const scalarField &weightField)
Templated helper function to output field values.
void initialise(const dictionary &dict)
Initialise, e.g. cell addressing.
tmp< Field< Type > > filterField(const Field< Type > &field) const
Filter a field according to cellIds.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
TypeName("volFieldValue")
Run-time type information.
const word & name() const
Return the name of this functionObject.
Base class for field value-based function objects.
virtual const objectRegistry & obr() const
The region or sub-region registry being used.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
bool canWeight(const scalarField &weightField) const
True if operation variant uses a weight-field that is available.
scalar V() const
Return total volume of the selected region.
label writeAll(const scalarField &V, const scalarField &weightField)
Helper function to output field values.
bool usesVol() const
True if the operation needs the cell-volume.