36 namespace 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_);
void size(const label n)
Older name for setAddressableSize.
defineTypeNameAndDebug(ObukhovLength, 0)
virtual bool write()
Write the result fields.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
bool empty() const noexcept
True if List is empty (ie, size() is zero)
Ostream & endl(Ostream &os)
Add newline and flush stream.
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.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
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.
virtual const word & type() const =0
Runtime type information.
messageStream Warning
Warning stream (stdout output on master, null elsewhere), with additional 'FOAM Warning' header text...
word resultName_
Name of result fields.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
virtual bool read(const dictionary &dict)
Read optional controls.
virtual bool read(const dictionary &dict)
Read the fieldsExpression data.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...