92 parsing::genericRagelLemonDriver(),
97 hasDimensions_(false),
98 fieldGeoType_(NO_DATA),
113 parsing::genericRagelLemonDriver(),
118 hasDimensions_(false),
129 const word& meshName,
145 parsing::genericRagelLemonDriver(),
167 resultDimensions_.clear();
169 hasDimensions_ = resultDimensions_.readIfPresent(
"dimensions",
dict);
179 const std::string& expr,
184 scanner scan(this->debugScanner());
194 resultField_.reset(
nullptr);
206 const auto* regIOobjectPtr = resultField_.
get();
215 switch (fieldGeoType_)
218 #define doLocalCode(GeoField) \
220 const auto* ptr = dynamic_cast<const GeoField*>(regIOobjectPtr); \
221 typedef typename GeoField::value_type Type; \
229 word(pTraits<Type>::typeName) + word("(zero)"), \
231 dimensioned<Type>(Zero), \
233 defaultBoundaryType(*ptr) \
Macros for easy insertion into run-time selection tables.
#define addNamedToRunTimeSelectionTable(baseType, thisType, argNames, lookupName)
Add to construction table with 'lookupName' as the key.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
T * get() noexcept
Return pointer to managed object without nullptr checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
void resetDb(const objectRegistry *obrPtr=nullptr)
Reset the objectRegistry (for functions).
bool debugScanner() const noexcept
Read access to scanner debug.
void resetTimeReference(const TimeState *ts)
Reset the time-state reference.
const dictionary & dict() const noexcept
The dictionary with all input data/specification.
Base driver for parsing value expressions associated with an fvMesh.
virtual bool readDict(const dictionary &dict)
Read variables, tables etc.
fvExprDriver(enum exprDriver::searchControls search=exprDriver::searchControls::DEFAULT_SEARCH, const dictionary &dict=dictionary::null)
Default construct, and default construct with search preferences.
Driver for volume, surface, point field expressions.
const fvMesh & mesh_
The referenced mesh.
autoPtr< regIOobject > dupZeroField() const
A zero-initialized field with the same type as the result field.
expressions::FieldAssociation fieldGeoType_
A volume/surface/point field.
virtual unsigned parse(const std::string &expr, size_t pos=0, size_t len=std::string::npos)
Execute the parser.
virtual bool readDict(const dictionary &dict)
Read variables, tables etc.
parseDriver(const parseDriver &)=delete
bool hasDimensions_
Requested use of dimensions.
virtual const fvMesh & mesh() const
The mesh we are attached to.
word resultType_
The result type-name.
autoPtr< regIOobject > resultField_
The results (volume, surface, point).
bool isLogical_
A logical (bool-like) field (but actually a scalar).
void clearField()
Clear out local copies of the field.
dimensionSet resultDimensions_
The result dimensions.
Ragel lexer/scanner interface for volume expressions.
bool process(const std::string &str, size_t pos, size_t len, parseDriver &driver_)
Evaluate sub-string.
Mesh data needed to do the Finite Volume discretisation.
genericRagelLemonDriver()
Construct null.
A class for handling words, derived from Foam::string.
Macro definitions for declaring ClassName(), NamespaceName(), etc.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define doLocalCode(FieldType, Variable)
Namespace for volume field expressions parsing and evaluation.
A namespace for expression-related classes/traits etc.
@ VOLUME_DATA
Volume data.
Collection of static functions and data related to parsing and an isolated namespace for lexers,...
GeometricField< vector, fvsPatchField, surfaceMesh > surfaceVectorField
dimensionedScalar pos(const dimensionedScalar &ds)
GeometricField< vector, fvPatchField, volMesh > volVectorField
GeometricField< tensor, pointPatchField, pointMesh > pointTensorField
GeometricField< scalar, pointPatchField, pointMesh > pointScalarField
GeometricField< sphericalTensor, pointPatchField, pointMesh > pointSphericalTensorField
GeometricField< scalar, fvPatchField, volMesh > volScalarField
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
GeometricField< scalar, fvsPatchField, surfaceMesh > surfaceScalarField
GeometricField< symmTensor, pointPatchField, pointMesh > pointSymmTensorField
GeometricField< tensor, fvPatchField, volMesh > volTensorField
GeometricField< tensor, fvsPatchField, surfaceMesh > surfaceTensorField
GeometricField< sphericalTensor, fvPatchField, volMesh > volSphericalTensorField
GeometricField< sphericalTensor, fvsPatchField, surfaceMesh > surfaceSphericalTensorField
GeometricField< symmTensor, fvPatchField, volMesh > volSymmTensorField
void rhs(fvMatrix< typename Expr::value_type > &m, const Expr &expression)
GeometricField< symmTensor, fvsPatchField, surfaceMesh > surfaceSymmTensorField