Go to the documentation of this file.
93 #ifndef functionObjects_fvExpressionField_H
94 #define functionObjects_fvExpressionField_H
105 namespace functionObjects
112 class 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
expressions::exprString valueExpr_
Expression to evaluate.
Defines the attributes of an object for which implicit objectRegistry management is supported,...
virtual bool read(const dictionary &dict)
Read the data.
wordList preloadFields_
Names fields to preload.
Create/overwrite field (default)
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static Ostream & output(Ostream &os, const IntRange< T > &range)
A class for handling words, derived from Foam::string.
virtual ~fvExpressionField()
Destructor.
autoPtr< expressions::volumeExprDriver > driver_
bool loadAndStore(const IOobject &io)
Attempt load from io, store on database if successful.
bool loadField(const IOobject &io)
Forward to loadAndStore for supported types.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
TypeName("exprField")
Runtime type information.
Specialization of Foam::functionObject for an Foam::fvMesh, providing a reference to the Foam::fvMesh...
word fieldName_
Name of the field.
List< word > wordList
A List of words.
static const Enum< actionType > actionNames_
Action type names.
dimensionSet dimensions_
Dimensions for new field.
void operator=(const fvExpressionField &)=delete
No copy assignment.
dictionary dict_
The context dictionary.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
bool store_
Store calculated field.
virtual word fieldName() const
Qualified/unqualified field name (depends on action)
bool loadFromFiles_
Load fields from files (not from objectRegistry)
bool performAction(bool doWrite)
bool setField(GeoField &output, const GeoField &evaluated, const boolField &cond)
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 Time and dictionary.
actionType action_
Operation mode.
Field< bool > boolField
Specialisation of Field<T> for bool.
bool autowrite_
Set AUTO_WRITE for new field.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const word & name() const noexcept
Return the name of this functionObject.
virtual bool write()
Write.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
virtual bool execute()
Execute.
actionType
Action type enumeration.
expressions::exprString maskExpr_
The field-mask expression (modify mode)
bool hasDimensions_
True if dimensions_ should be used (creation)
Function object that generates or modifies a field based on expressions.