Go to the documentation of this file.
69 #ifndef functionObjects_fieldsExpression_H
70 #define functionObjects_fieldsExpression_H
79 namespace functionObjects
86 class fieldsExpression
88 public fvMeshFunctionObject
105 const word& typeName,
111 template<
class Type,
class FOType>
115 template<
class Type,
class FOType>
120 template<
class FOType>
124 virtual bool calc() = 0;
165 virtual bool write();
168 virtual bool clear();
bool calcFieldTypes(FOType &fo)
Call 'calcFieldType' for the given functionObject.
virtual bool read(const dictionary &dict)
Read the fieldsExpression data.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static const List< T > & null()
Return a null List.
virtual bool execute()
Calculate the result fields.
A class for handling words, derived from Foam::string.
TypeName("fieldsExpression")
Runtime type information.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fieldsExpression(const word &name, const Time &runTime, const dictionary &dict, const wordList &fieldNames=wordList::null(), const word &resultName=word::null)
Construct from Time and dictionary.
List< word > wordList
A List of words.
bool calcAllTypes(FOType &fo)
Call 'calcType' for the given functionObject.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool calc()=0
Calculate expression.
Intermediate class for handling field expression function objects (e.g. add, subtract etc....
virtual bool write()
Write the result fields.
const word & name() const
Return the name of this functionObject.
bool calcType(FOType &fo)
Call 'calcFieldTypes' for the given 'Type' and functionObject.
wordList fieldNames_
Names of fields to process.
static const word null
An empty word.
word resultName_
Name of result fields.
void operator=(const fieldsExpression &)=delete
No copy assignment.
virtual ~fieldsExpression()=default
Destructor.
void setResultName(const word &typeName, const wordList &defaultArg=wordList::null())
virtual bool clear()
Clear the result fields from the objectRegistry.