Go to the documentation of this file.
36 namespace functionObjects
48 const word& defaultArg
51 if (fieldName_.empty())
53 fieldName_ = defaultArg;
56 if (resultName_.empty())
58 if (fieldName_ != defaultArg)
60 resultName_ = typeName +
'(' + fieldName_ +
')';
64 resultName_ = typeName;
77 const word& fieldName,
78 const word& resultName
82 fieldName_(fieldName),
83 resultName_(resultName)
111 <<
" functionObjects::" <<
type() <<
" " <<
name()
112 <<
" failed to execute." <<
endl;
126 return writeObject(resultName_);
132 return clearObject(resultName_);
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
virtual bool read(const dictionary &dict)
Read the fieldExpression data.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
virtual bool clear()
Clear the result field from the objectRegistry.
void setResultName(const word &typeName, const word &defaultArg)
Set the name of result field.
fieldExpression(const word &name, const Time &runTime, const dictionary &dict, const word &fieldName=word::null, const word &resultName=word::null)
Construct from Time and dictionary.
word name(const complex &c)
Return string representation of complex.
word fieldName_
Name of field to process.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool read(const dictionary &dict)
Read optional controls.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
defineTypeNameAndDebug(ObukhovLength, 0)
virtual bool write()
Write the result field.
virtual bool execute()
Calculate the result field.
word resultName_
Name of result field.