106#ifndef Foam_functionObjects_fvExpressionField_H
107#define Foam_functionObjects_fvExpressionField_H
182 autoPtr<expressions::volumeExprDriver>
driver_;
188 template<
class FieldType>
196 label
loadFields(
const UList<word>& fieldSet_);
199 template<
class GeoField>
203 const GeoField& evaluated,
224 const bool loadFromFiles =
false
Enum is a wrapper around a list of names/values that represent particular enumeration (or int) values...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
A variant of Foam::string with expansion of dictionary variables into a comma-separated form.
Function object that generates or modifies a field based on expressions.
expressions::exprString maskExpr_
The field-mask expression (modify mode).
void operator=(const fvExpressionField &)=delete
No copy assignment.
bool setField(GeoField &output, const GeoField &evaluated, const boolField &cond)
Sets the values of the output field based on a condition.
autoPtr< expressions::volumeExprDriver > driver_
bool performAction(bool doWrite)
Execute the requested action.
dimensionSet dimensions_
Dimensions for new field.
virtual ~fvExpressionField()
Destructor.
dictionary dict_
The context dictionary.
bool loadFromFiles_
Load fields from files (not from objectRegistry).
bool autowrite_
Set AUTO_WRITE for new field.
virtual bool read(const dictionary &dict)
Read the function-object dictionary.
word fieldName_
Name of the field.
bool hasDimensions_
True if dimensions_ should be used (creation).
bool loadAndStore(const IOobject &io)
Attempt load from io, store on database if successful.
static const Enum< actionType > actionNames_
Action type names.
fvExpressionField(const fvExpressionField &)=delete
No copy construct.
bool store_
Store calculated field.
actionType
Action type enumeration.
@ opModify
Modify existing field.
@ opNew
Create/overwrite field (default).
label loadFields(const UList< word > &fieldSet_)
Attempt to load specified fields.
fvExpressionField(const word &name, const Time &runTime, const dictionary &dict, const bool loadFromFiles=false)
Construct from name, Time and dictionary.
virtual bool execute()
Execute the function-object operations.
virtual word fieldName() const
Qualified/unqualified field name (depends on action).
expressions::exprString valueExpr_
Expression to evaluate.
wordList preloadFields_
Names fields to preload.
virtual bool write()
Write the function-object results.
actionType action_
Operation mode.
bool loadField(const IOobject &io)
Forward to loadAndStore for supported types.
TypeName("exprField")
Runtime type information.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
fvMeshFunctionObject(const fvMeshFunctionObject &)=delete
No copy construct.
A class for handling words, derived from Foam::string.
Function objects are OpenFOAM utilities to ease workflow configurations and enhance workflows.
List< word > wordList
List of word.
Field< bool > boolField
Specialisation of Field<T> for bool.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.