36 namespace functionObjects
48 const word& defaultArg
79 const word& fieldName,
80 const word& resultName
84 fieldName_(fieldName),
85 resultName_(resultName)
97 if (fieldName_.empty() ||
dict.found(
"field"))
99 dict.readEntry(
"field", fieldName_);
102 dict.readIfPresent(
"result", resultName_);
104 if (
dict.found(
"cellZones"))
110 zoneSubSetPtr_.reset(
nullptr);
125 <<
" functionObjects::" <<
type() <<
" " <<
name()
126 <<
" failed to execute." <<
endl;
140 return writeObject(resultName_);
146 return clearObject(resultName_);
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.
defineTypeNameAndDebug(ObukhovLength, 0)
word resultName_
Name of result field.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
word fieldName_
Name of field to process.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool read(const dictionary &dict)
Read the fieldExpression data.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
bool read(const char *buf, int32_t &val)
Same as readInt32.
void setResultName(const word &typeName, const word &defaultArg)
Set the name of result field.
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.
A class for handling words, derived from Foam::string.
virtual bool write()
Write the result field.
virtual bool execute()
Calculate the result field.
virtual bool clear()
Clear the result field from the objectRegistry.
messageStream Warning
Warning stream (stdout output on master, null elsewhere), with additional 'FOAM Warning' header text...
virtual bool read(const dictionary &dict)
Read optional controls.
word scopedName(const word &name) const
Return a scoped (prefixed) name.