93#ifndef functionObjects_fvExpressionField_H
94#define functionObjects_fvExpressionField_H
105namespace functionObjects
112class fvExpressionField
114 public fvMeshFunctionObject
169 autoPtr<expressions::volumeExprDriver>
driver_;
175 template<
class FieldType>
183 label
loadFields(
const UList<word>& fieldSet_);
185 template<
class GeoField>
189 const GeoField& evaluated,
209 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...
const word & name() const noexcept
Return the name of this functionObject.
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)
autoPtr< expressions::volumeExprDriver > driver_
bool performAction(bool doWrite)
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 data.
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.
virtual bool execute()
Execute.
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.
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...
A class for handling words, derived from Foam::string.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, false)
List< word > wordList
A List of words.
Field< bool > boolField
Specialisation of Field<T> for bool.
static Ostream & output(Ostream &os, const IntRange< T > &range)
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.