Go to the documentation of this file.
123 #ifndef functionObjects_volFieldValue_H
124 #define functionObjects_volFieldValue_H
133 namespace functionObjects
135 namespace fieldValues
245 const word& fieldName,
246 const bool mandatory =
false
253 const Field<Type>&
values,
269 const word& fieldName,
323 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.
postOperationType
Post-operation type enumeration.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Operation returns a scalar.
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.
void operator=(const volFieldValue &)=delete
No copy assignment.
virtual bool read(const dictionary &dict)
Read from dictionary.
Coefficient of variation.
Operation using mag (eg, for weighting)
Sum of component magnitudes.
operationType operation_
Operation to apply to values.
virtual bool write()
Calculate and write.
operationType
Operation type enumeration.
List< word > wordList
A List of words.
Registry of regIOobjects.
bool validField(const word &fieldName) const
Return true if the field name is valid.
static const Enum< postOperationType > postOperationTypeNames_
Operation type names.
Provides a 'volRegion' specialization of the fieldValue function object.
operationVariant
Bitmask values for operation variants.
virtual void writeFileHeader(Ostream &os) const
Output file header information.
static const Enum< operationType > operationTypeNames_
Operation type names.
postOperationType postOperation_
Optional post-evaluation operation.
bool writeValues(const word &fieldName, const scalarField &V, const scalarField &weightField)
Templated helper function to output field values.
bool usesMag() const
True if the operation variant uses mag.
tmp< Field< Type > > filterField(const Field< Type > &field) const
Filter a field according to cellIds.
wordList weightFieldNames_
Weight field name(s) - optional.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
TypeName("volFieldValue")
Declare type-name, virtual type (with debug switch)
Component-wise sqrt after normal operation.
tmp< Field< Type > > getFieldValues(const word &fieldName, const bool mandatory=false) const
Insert field values into values list.
const word & name() const
Return the name of this functionObject.
Intermediate class for handling 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.
No additional operation after calculation.
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.
Component-wise mag after normal operation.