Go to the documentation of this file.
123 #ifndef functionObjects_volFieldValue_H
124 #define functionObjects_volFieldValue_H
133 namespace functionObjects
135 namespace fieldValues
228 inline
bool is_magOp() const noexcept;
244 const word& fieldName,
245 const
bool mandatory = false
252 const Field<Type>&
values,
268 const word& fieldName,
322 virtual
bool write();
334 #include "volFieldValueI.H"
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
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.
Weighted volume integral.
bool is_weightedOp() const noexcept
True if the operation variant uses a weight-field.
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.
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.
const dictionary & dict() const noexcept
Return the reference to the construction dictionary.
bool usesVol() const noexcept
True if the operation needs the cell-volume.
operationVariant
Bitmask values for operation variants.
virtual void writeFileHeader(Ostream &os) const
Output file header information.
bool canWeight(const scalarField &fld) const
True if field is non-empty on any processor.
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.
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))
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)
OBJstream os(runTime.globalPath()/outputName)
Component-wise sqrt after normal operation.
const word & name() const noexcept
Return the name of this functionObject.
tmp< Field< Type > > getFieldValues(const word &fieldName, const bool mandatory=false) const
Insert field values into values list.
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 is_magOp() const noexcept
True if the operation variant uses mag.
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.
Component-wise mag after normal operation.