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();
virtual ~fieldsExpression()=default
Destructor.
virtual bool write()
Write the result fields.
Forwards and collection of common volume field types.
Intermediate class for handling field expression function objects (e.g. add, subtract etc...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
bool calcAllTypes(FOType &fo)
Call 'calcType' for the given functionObject.
static const List< word > & null()
Return a null List.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
const word & name() const noexcept
Return the name of this functionObject.
wordList fieldNames_
Names of fields to process.
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.
virtual bool execute()
Calculate the result fields.
void setResultName(const word &typeName, const wordList &defaultArg=wordList::null())
A class for handling words, derived from Foam::string.
virtual bool clear()
Clear the result fields from the objectRegistry.
static const word null
An empty word.
bool calcFieldTypes(FOType &fo)
Call 'calcFieldType' for the given functionObject.
word resultName_
Name of result fields.
List< word > wordList
List of word.
virtual bool calc()=0
Calculate expression.
void operator=(const fieldsExpression &)=delete
No copy assignment.
bool calcType(FOType &fo)
Call 'calcFieldTypes' for the given 'Type' and functionObject.
TypeName("fieldsExpression")
Runtime type information.
virtual bool read(const dictionary &dict)
Read the fieldsExpression data.