36namespace functionObjects
83 const word& resultName
87 fieldNames_(fieldNames),
88 resultName_(resultName)
95 <<
"functionObject::" <<
type() <<
" " <<
name
96 <<
" requires at least 2 fields only "
109 if (fieldNames_.empty() ||
dict.found(
"fields"))
111 dict.readEntry(
"fields", fieldNames_);
114 dict.readIfPresent(
"result", resultName_);
125 <<
" functionObjects::" <<
type() <<
" " <<
name()
126 <<
" cannot find required fields " << fieldNames_ <<
endl;
140 return writeObject(resultName_);
146 return clearObject(resultName_);
virtual bool read()
Re-read model coefficients if they have changed.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool empty() const noexcept
True if the UList is empty (ie, size() is zero)
void size(const label n)
Older name for setAddressableSize.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
const word & name() const noexcept
Return the name of this functionObject.
virtual const word & type() const =0
Runtime type information.
Intermediate class for handling field expression function objects (e.g. add, subtract etc....
wordList fieldNames_
Names of fields to process.
virtual bool read(const dictionary &dict)
Read the fieldsExpression data.
word resultName_
Name of result fields.
void setResultName(const word &typeName, const wordList &defaultArg=wordList::null())
virtual bool clear()
Clear the result fields from the objectRegistry.
virtual bool execute()
Calculate the result fields.
virtual bool write()
Write the result fields.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
errorManipArg< error, int > exit(error &err, const int errNo=1)