104 #ifndef functionObjects_volFieldValue_H 105 #define functionObjects_volFieldValue_H 114 namespace functionObjects
116 namespace fieldValues
192 template<
class Type,
class Op>
195 const Field<Type>& values,
196 Result<scalar>& result,
202 template<
class Type,
class ResultType>
205 const Field<Type>& values,
208 Result<ResultType>& result
216 const Field<Type>& values,
226 const Field<Type>& values,
295 const word& fieldName,
301 template<
class Type,
class ResultType>
304 const word& fieldName,
318 virtual bool write();
323 void volFieldValue::writeFileHeaderLocation<scalar>();
347 return is >> result.value >> result.celli >> result.proci >> result.cc;
358 return os << result.value << result.celli << result.proci << result.cc;
operationType operation_
Operation to apply to values.
bool processValues(const Field< Type > &values, const scalarField &weights, const scalarField &V, Result< ResultType > &result) const
Apply the operation to the values, and return true if successful.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return the name of this functionObject.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Switch writeLocation_
Write the location if available for this operation - optional.
void initialise(const dictionary &dict)
Initialise, e.g. cell addressing.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Forward declare the result structure.
volFieldValue(const word &name, const Time &runTime, const dictionary &dict)
Construct from name, Time and dictionary.
bool processValuesTypeType(const Field< Type > &values, const scalarField &weights, const scalarField &V, Result< Type > &result) const
Apply a Type -> Type operation to the values.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
void opMag(const Field< Type > &values, Result< scalar > &result, const Op &op) const
Apply a comparison operation (min/max) to the field magnitude,.
bool validField(const word &fieldName) const
Return true if the field name is valid.
A class for handling words, derived from string.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
tmp< Field< Type > > filterField(const Field< Type > &field) const
Filter a field according to cellIds.
const dictionary & dict() const
Return the reference to the construction dictionary.
virtual ~volFieldValue()
Destructor.
bool writeValues(const word &fieldName, const scalarField &weights, const scalarField &V)
Templated helper function to output field values.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
scalar V() const
Return total volume of the region.
tmp< Field< Type > > getFieldValues(const word &fieldName) const
Insert field values into values list.
TypeName("volFieldValue")
Run-time type information.
List< word > wordList
A List of words.
virtual void writeFileHeader(const label i)
Output file header information.
operationType
Operation type enumeration.
wordList weightFieldNames_
Weight field names.
A class for managing temporary objects.
Registry of regIOobjects.
virtual bool write()
Calculate and write.
virtual bool read(const dictionary &)
Read from dictionary.
static const NamedEnum< operationType, 11 > operationTypeNames_
Operation type names.
scalar scaleFactor_
Scale factor - optional.
void writeFileHeaderLocation()
Output file header location information for a given type.