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;
67 resultName_ = scopedName(resultName_);
79 const word& fieldName,
80 const word& resultName
84 fieldName_(fieldName),
85 resultName_(resultName)
104 if (
dict.found(
"cellZones"))
125 <<
" functionObjects::" <<
type() <<
" " <<
name()
126 <<
" failed to execute." <<
endl;
140 return writeObject(resultName_);
146 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.
autoPtr< Detail::zoneSubSet > zoneSubSetPtr_
Sub-set mesh.
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 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.
const fvMesh & mesh_
Reference to the fvMesh.
defineTypeNameAndDebug(ObukhovLength, 0)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
virtual bool write()
Write the result field.
virtual bool execute()
Calculate the result field.
word resultName_
Name of result field.