Base driver for parsing value expressions associated with an fvMesh. More...


Public Member Functions | |
| TypeName ("fvExprDriver") | |
| Runtime type information. More... | |
| declareRunTimeSelectionTable (autoPtr, fvExprDriver, dictionary,(const dictionary &dict, const fvMesh &mesh),(dict, mesh)) | |
| declareRunTimeSelectionTable (autoPtr, fvExprDriver, idName,(const word &ident, const fvMesh &mesh),(ident, mesh)) | |
| fvExprDriver (enum exprDriver::searchControls search=exprDriver::searchControls::DEFAULT_SEARCH, const dictionary &dict=dictionary::null) | |
| Default construct, and default construct with search preferences. More... | |
| fvExprDriver (const fvExprDriver &rhs, const dictionary &dict) | |
| Copy construct with dictionary reference. More... | |
| fvExprDriver (const dictionary &dict) | |
| Construct from a dictionary. More... | |
| virtual autoPtr< fvExprDriver > | clone ()=delete |
| Not generally clonable. More... | |
| virtual | ~fvExprDriver () |
| Destructor. More... | |
| virtual label | size () const =0 |
| The natural field size for the expression. More... | |
| virtual label | pointSize () const =0 |
| The point field size for the expression. More... | |
| bool | cacheSets () const |
| Status of cache-sets (static variable) More... | |
| virtual void | clearVariables () |
| Clear temporary variables, reset from expression strings. More... | |
| virtual bool | hasVariable (const word &name) const |
| True if named variable exists. More... | |
| virtual const exprResult & | variable (const word &name) const |
| Return const-access to the named variable. More... | |
| template<class Type > | |
| bool | isVariableOrField (const word &name, const bool wantPointData=false, const label expectSize=-1) const |
| Test for existence of a local/global variable or a field. More... | |
| template<class Type > | |
| tmp< Field< Type > > | getVariable (const word &name, const label expectSize, const bool mandatory=true) const |
| Retrieve local/global variable as a tmp field. More... | |
| word | getFieldClassName (const word &name) const |
| Lookup the field class name (memory or read from disk) More... | |
| topoSetSource::sourceType | topoSetType (const word &name) const |
| Return cell/face/point set type or unknown. More... | |
| topoSetSource::sourceType | topoZoneType (const word &name) const |
| Return cell/face/point zone type or unknown. More... | |
| topoSetSource::sourceType | topoSourceType (const word &name) const |
| Return cell/face/point zone/set type or unknown. More... | |
| refPtr< labelList > | getTopoSetLabels (const word &name, enum topoSetSource::sourceType setType) const |
| Get the labels associated with the topo set. More... | |
| bool | isCellZone (const word &name) const |
| Test if name is a known cellZone. More... | |
| bool | isFaceZone (const word &name) const |
| Test if name is a known faceZone. More... | |
| bool | isPointZone (const word &name) const |
| Test if name is a known pointZone. More... | |
| bool | isCellSet (const word &name) const |
| Test if name is a known cellSet. More... | |
| bool | isFaceSet (const word &name) const |
| Test if name is a known faceSet. More... | |
| bool | isPointSet (const word &name) const |
| Test if name is a known pointSet. More... | |
| virtual void | evaluateVariable (const word &varName, const expressions::exprString &expr) |
| Evaluate the expression and save as the specified named variable. More... | |
| virtual void | evaluateVariableRemote (string remote, const word &varName, const expressions::exprString &expr) |
| Evaluate an expression on a remote and save as the specified named variable. More... | |
| template<class Type > | |
| bool | isVariable (const word &name, bool wantPointData=false, label expectSize=-1) const |
| Test existence of a local/global variable. More... | |
| template<class Type > | |
| bool | foundField (const word &name) const |
| Test if specified field can be found in memory or disk. More... | |
| word | getTypeOfField (const word &fieldName) const |
| Read the IOobject for fieldName and return its headerClassName. More... | |
| virtual bool | readDict (const dictionary &dict) |
| Read variables, tables etc. More... | |
| Ostream & | writeCommon (Ostream &os, bool debug=false) const |
| Write "variables", "storedVariables", "delayedVariables", "globalScopes" if they are present. More... | |
| void | createWriterAndRead (const word &name) |
| Create a writer for this object. More... | |
| void | tryWrite () const |
| Write data if appropriate Should enable exact restarts. More... | |
| template<class GeomField > | |
| Foam::tmp< GeomField > | getOrReadField (const word &name, const bool mandatory, const bool getOldTime) |
| template<class GeomField > | |
| Foam::tmp< GeomField > | getOrReadPointField (const word &name, const bool mandatory, const bool getOldTime) |
| template<class GeomField , class Mesh > | |
| Foam::tmp< GeomField > | readAndRegister (const word &name, const Mesh &meshRef) |
| template<class Type > | |
| Foam::tmp< Foam::Field< Type > > | getVariable (const word &name, const label expectedSize, const bool mandatory) const |
| template<class GeomField , class Mesh > | |
| Foam::tmp< GeomField > | getOrReadFieldImpl (const word &name, const Mesh &meshRef, bool mandatory, bool getOldTime) |
| template<class T > | |
| Foam::autoPtr< T > | getTopoSet (const fvMesh &mesh, const word &name, SetOrigin &origin) const |
Public Member Functions inherited from exprDriver | |
| TypeName ("exprDriver") | |
| Runtime type information. More... | |
| exprDriver (const exprDriver &)=delete | |
| No copy construct. More... | |
| void | operator= (const exprDriver &)=delete |
| No copy assignment. More... | |
| exprDriver (enum searchControls search=searchControls::DEFAULT_SEARCH, const dictionary &dict=dictionary::null) | |
| Default construct, and default construct with search preferences. More... | |
| exprDriver (const exprDriver &rhs, const dictionary &dict) | |
| Copy construct with new dictionary reference. More... | |
| exprDriver (const dictionary &dict) | |
| Construct from a dictionary. More... | |
| virtual | ~exprDriver ()=default |
| Destructor. More... | |
| const TimeState * | timeState () const noexcept |
| Reference to the current time-state (can be nullptr) More... | |
| virtual scalar | timeValue () const |
| The current time value. More... | |
| virtual scalar | deltaT () const |
| The current deltaT value. More... | |
| const dictionary & | dict () const noexcept |
| The dictionary with all input data/specification. More... | |
| const exprResult & | result () const noexcept |
| Const access to expression result. More... | |
| exprResult & | result () noexcept |
| Non-const access to expression result. More... | |
| void | clearResult () |
| Clear the result. More... | |
| template<class Type > | |
| tmp< Field< Type > > | getResult (bool wantPointData=false) |
| Return the expression result as a tmp field. More... | |
| const word & | getResultType () const noexcept |
| The result type as word - same as result().valueType() More... | |
| void | resetDb (const objectRegistry *obrPtr=nullptr) |
| Reset the objectRegistry (for functions) More... | |
| void | resetDb (const objectRegistry &db) |
| Reset the objectRegistry (for functions) More... | |
| scalar | argValue () const noexcept |
| Get special-purpose scalar reference argument. More... | |
| int | stashedTokenId () const noexcept |
| Get "look-behind" parsing context (internal bookkeeping) More... | |
| int | resetStashedTokenId (int tokenId=0) const noexcept |
| Reset "look-behind" parsing context (mutable operation) More... | |
| void | setDebugging (bool scannerDebug, bool parserDebug) |
| Set the scanner/parser debug. More... | |
| void | setDebugging (const exprDriver &rhs) |
| Set the scanner/parser debug to match the input. More... | |
| bool | setCaching (bool on) noexcept |
| Toggle CACHE_READ_FIELDS control. More... | |
| void | setSearchBehaviour (enum searchControls search, const bool caching=false) |
| Set search behaviour, with additional CACHE_READ_FIELDS toggle on. More... | |
| void | setSearchBehaviour (const exprDriver &rhs) |
| Set search behaviour to be identical to rhs. More... | |
| bool | debugScanner () const noexcept |
| Read access to scanner debug. More... | |
| bool | debugParser () const noexcept |
| Read access to parser debug. More... | |
| bool | prevIterIsOldTime () const |
| void | setArgument (const scalar val) noexcept |
| Set special-purpose scalar reference argument. More... | |
| void | addVariables (const expressions::exprString &expr, bool clear=true) |
| Add/set string expressions for variables. More... | |
| void | addVariables (const UList< expressions::exprString > &list, bool clear=true) |
| Add/set string expressions for variables. More... | |
| template<class T > | |
| void | addUniformVariable (const word &name, const T &val) |
| Add a uniform variable from an outside caller. More... | |
| bool | hasContextObjects () const |
| True if any context fields are defined. More... | |
| const regIOobject * | cfindContextIOobject (const word &name) const |
| Find named context field, if it exists. More... | |
| template<class ObjType > | |
| const ObjType * | cfindContextObject (const word &name) const |
| Find context field object of specified type. More... | |
| void | addContextObject (const word &name, const regIOobject *) |
| Add the object to the context. More... | |
| void | addContextObject (const regIOobject *) |
| Add the object to the context. More... | |
| void | removeContextObject (const word &name) |
| Remove the object from the context. More... | |
| void | removeContextObject (const regIOobject *) |
| Remove the object from the context. More... | |
| const contextObjectTableType & | contextObjects () const noexcept |
| Read access to the object context. More... | |
| contextObjectTableType & | contextObjects () noexcept |
| Write access to the object context. More... | |
| template<class Type > | |
| bool | isFunction (const word &name) const |
| Named mapping with given type exists. More... | |
| template<class Type > | |
| Type | getFunctionValue (const word &name, const scalar x) const |
| Evaluate named mapping for the given time/value. Zero for undefined/unknown. More... | |
| template<class Type > | |
| void | fillFunctionValues (Field< Type > &result, const word &name, const scalarField &input) const |
| Fill result with values remapped according to the named Function1. More... | |
| template<class T > | |
| bool | isLocalVariable (const word &name, bool wantPointData=false, label expectedSize=-1) const |
| Test existence of a local variable. More... | |
| template<class Type > | |
| tmp< Field< Type > > | getLocalVariable (const word &name, label expectSize, const bool mandatory=true) const |
| Retrieve local/global variable as a tmp field. More... | |
| virtual unsigned | parse (const std::string &expr, size_t pos=0, size_t len=std::string::npos)=0 |
| Execute the parser. More... | |
| template<class Type > | |
| tmp< Field< Type > > | evaluate (const expressions::exprString &expr, bool wantPointData=false) |
| Evaluate the expression and return the field. More... | |
| template<class Type > | |
| Type | evaluateUniform (const expressions::exprString &expr, bool wantPointData=false) |
| Evaluate the expression and return a single value. More... | |
| void | evaluateVariable (const word &varName, const expressions::exprString &expr) |
| Evaluate the expression and save as the specified named variable. More... | |
| template<class Type > | |
| tmp< Field< Type > > | newField (const Type &val=pTraits< Type >::zero) const |
| Return a new field with the size() More... | |
| template<class Type > | |
| tmp< Field< Type > > | newPointField (const Type &val=pTraits< Type >::zero) const |
| Return a new field with the pointSize() More... | |
| expressions::exprString | readExpression (const word &name) |
| Read an expression string (with the current dictionary) and do substitutions. More... | |
| label | setVariableStrings (const dictionary &dict, bool mandatory=false) |
| Read "variables" and assigns to the list of expression strings. More... | |
| Ostream & | writeVariableStrings (Ostream &os, const word &keyword="") const |
| Write "variables". More... | |
| template<class Type > | |
| void | addUniformVariable (const word &name, const Type &val) |
| template<class Type > | |
| Foam::tmp< Foam::Field< Type > > | evaluate (const expressions::exprString &expr, bool wantPointData) |
| template<class Type > | |
| Foam::tmp< Foam::Field< Type > > | getResult (bool wantPointData) |
| template<class Type > | |
| const Foam::Function1< Type > * | getFunction1Ptr (const word &name, const HashTable< refPtr< Function1< Type >>> &tbl, wordList *listFailure) |
| template<class Type > | |
| Foam::tmp< Foam::Field< Type > > | newField (const Type &val) const |
| template<class Type > | |
| Foam::tmp< Foam::Field< Type > > | newPointField (const Type &val) const |
Static Public Member Functions | |
| static const fvMesh & | defaultMesh () |
| Get the default mesh, if one is defined. More... | |
| static const fvMesh * | resetDefaultMesh (const fvMesh &mesh, const bool force=false) |
| Set the default mesh (if not already set) More... | |
| static autoPtr< fvExprDriver > | New (const dictionary &dict, const fvMesh &mesh) |
| Return a reference to the selected value driver. More... | |
| static autoPtr< fvExprDriver > | New (const dictionary &dict) |
| Return a reference to the selected value driver. More... | |
| static autoPtr< fvExprDriver > | New (const word &type, const word &id, const fvMesh &mesh) |
| Return a reference to the selected value driver. More... | |
Static Public Member Functions inherited from exprDriver | |
| static expressions::exprString | readExpression (const word &name, const dictionary &dict) |
| Read an expression string and do substitutions. More... | |
| static List< expressions::exprString > | readVariableStrings (const dictionary &dict, const word &name="variables", bool mandatory=false) |
| Read the list of variable strings. More... | |
Protected Types | |
| enum | SetOrigin { INVALID = 0, NEW, FILE, MEMORY, CACHE } |
| The origin of the topoSet. More... | |
Protected Member Functions | |
| virtual const fvMesh & | mesh () const =0 |
| The mesh we are attached to. More... | |
| void | setGlobalScopes (const wordUList &scopes) |
| Define scopes for global variables. More... | |
| virtual exprResult & | variable (const word &name) |
| Non-const access to the named variable (sub-classes only) More... | |
| template<class T > | |
| bool | isGlobalVariable (const word &name, const bool wantPointData=false, const label expectedSize=-1) const |
| Test existence of a global variable. More... | |
| const exprResult & | lookupGlobal (const word &name) const |
| Return the global variable if available or a null result. More... | |
| template<class Type > | |
| bool | isField (const word &name, const bool wantPointData=false, const label expectSize=-1) const |
| Test for the existence of a mesh field. More... | |
| template<class GeomField > | |
| tmp< GeomField > | getOrReadField (const word &name, const bool mandatory=true, const bool getOldTime=false) |
| Retrieve field from memory or disk. More... | |
| template<class GeomField > | |
| tmp< GeomField > | getOrReadPointField (const word &name, const bool mandatory=true, const bool getOldTime=false) |
| Retrieve point field from memory or disk. More... | |
| template<class GeomField , class MeshRef > | |
| tmp< GeomField > | getOrReadFieldImpl (const word &name, const MeshRef &meshRef, const bool mandatory=true, const bool getOldTime=false) |
| Retrieve field from memory or disk (implementation) More... | |
| template<class GeomField , class MeshRef > | |
| tmp< GeomField > | readAndRegister (const word &name, const MeshRef &meshRef) |
| Helper function for getOrReadField. More... | |
| template<class T > | |
| autoPtr< T > | getTopoSet (const fvMesh &mesh, const word &setName, SetOrigin &origin) const |
| Get topoSet. More... | |
| template<class T > | |
| bool | updateSet (autoPtr< T > &setPtr, const word &setName, SetOrigin origin) const |
| Update topoSet. More... | |
| virtual void | updateSpecialVariables (bool force=false) |
| Examine current variable values and update stored variables. More... | |
| virtual bool | hasDataToWrite () const |
| Do we need a data file to be written. More... | |
| virtual void | prepareData (dictionary &dict) const |
| Prepare/update special variables and add to dictionary, normally via the reader/writer. More... | |
| virtual void | getData (const dictionary &dict) |
| Read data from dictionary, normally via the reader/writer. More... | |
Protected Member Functions inherited from exprDriver | |
| bool | searchRegistry () const noexcept |
| bool | searchFiles () const noexcept |
| bool | cacheReadFields () const noexcept |
| void | resetTimeReference (const TimeState *ts) |
| Reset the time-state reference. More... | |
| void | resetTimeReference (const TimeState &ts) |
| Reset the time-state reference. More... | |
| void | writeFunctions (Ostream &os) const |
| Write scalar/vector Function1 entries in dictionary format. More... | |
| void | fill_random (scalarField &field, label seed=0, const bool gaussian=false) const |
| Fill a random field. More... | |
| virtual bool | update () |
| Update things. More... | |
| virtual exprResult | getRemoteResult (const exprDriver &other) const |
| Get the result from another driver. More... | |
Static Protected Member Functions | |
| static const fvMesh & | regionMesh (const dictionary &dict, const fvMesh &mesh, bool readIfNecessary) |
| Determine mesh or region mesh as specified in the dictionary with the keyword "region". More... | |
| template<class T > | |
| static word | defaultBoundaryType (const T &) |
| Default boundary type is calculated. More... | |
| template<class Type > | |
| static word | defaultBoundaryType (const VolumeField< Type > &) |
| Default boundary type for volume fields is zeroGradient since they are essentially just internal fields. More... | |
| template<class T > | |
| static void | correctField (T &) |
| Apply correctBoundaryConditions (volume fields only) More... | |
| template<class Type > | |
| static void | correctField (VolumeField< Type > &fld) |
Static Protected Member Functions inherited from exprDriver | |
| template<class Type > | |
| static Type | weightedAverage (const scalarField &weights, const Field< Type > &fld) |
| The (global) weighted average of a field, with stabilisation. More... | |
| template<class Type > | |
| static Type | weightedSum (const scalarField &weights, const Field< Type > &fld) |
| The (global) weighted sum (integral) of a field. More... | |
| static point | getPositionOfMinimum (const scalarField &vals, const pointField &locs) |
| Return the location of the min value. More... | |
| static point | getPositionOfMaximum (const scalarField &vals, const pointField &locs) |
| Return the location of the max value. More... | |
Friends | |
| class | fvExprDriverWriter |
Additional Inherited Members | |
Public Types inherited from exprDriver | |
| enum | searchControls { NO_SEARCH = 0, SEARCH_REGISTRY = 1, SEARCH_FILES = 2, CACHE_READ_FIELDS = 4, DEFAULT_SEARCH = (SEARCH_REGISTRY) } |
| Search/caching controls. More... | |
| typedef HashTable< const regIOobject * > | contextObjectTableType |
| Externally defined context fields. More... | |
Protected Attributes inherited from exprDriver | |
| const dictionary & | dict_ |
| The dictionary with all input data/specification. More... | |
| exprResult | result_ |
| The result. More... | |
| List< expressions::exprString > | variableStrings_ |
| Variable definitions, as read from a dictionary. More... | |
| HashTable< exprResult > | variables_ |
| The variables table. More... | |
| HashTable< refPtr< Function1< scalar > > > | scalarFuncs_ |
| Function1 mappings/timelines (scalar), evaluated at the simulation time or with arbitrary scalars. More... | |
| HashTable< refPtr< Function1< vector > > > | vectorFuncs_ |
| Function1 mappings/timelines (vector), evaluated at the simulation time or with arbitrary scalars. More... | |
| contextObjectTableType | contextObjects_ |
| Externally defined context fields. More... | |
| scalar | arg1Value_ |
| Special-purpose scalar reference argument. More... | |
| const TimeState * | timeStatePtr_ |
| Reference to the time-state. More... | |
| const objectRegistry * | obrPtr_ |
| Pointer to an object registry (for functions etc). More... | |
| int | stashedTokenId_ |
| Internal bookkeeping as "look-behind" parsing context. More... | |
| bool | debugScanner_ |
| Request debugging for scanner. More... | |
| bool | debugParser_ |
| Request debugging for parser. More... | |
| bool | allowShadowing_ |
| Allow variable names to mask field names. More... | |
| bool | prevIterIsOldTime_ |
| Use value of previous iteration when oldTime is requested. More... | |
| searchControls | searchCtrl_ |
| Registry/disk/caching control. More... | |
Base driver for parsing value expressions associated with an fvMesh.
Largely based on code and ideas from swak4foam
Properties
| Property | Description | Required | Default |
|---|---|---|---|
variables | List of variables for expressions | no | () |
delayedVariables | List of delayed variables | no | () |
storedVariables | List of stored variables | no | () |
globalScopes | Scopes for global variables | no | () |
allowShadowing | Allow variables to shadow field names | no | false |
Debug Properties
| Property | Description | Required | Default |
|---|---|---|---|
debug.driver | Debug level (int) for base driver | no | |
debug.scanner | Add debug for scanner | no | false |
debug.parser | Add debug for parser | no | false |
Definition at line 132 of file fvExprDriver.H.
|
protected |
The origin of the topoSet.
| Enumerator | |
|---|---|
| INVALID | |
| NEW | |
| FILE | |
| MEMORY | |
| CACHE | |
Definition at line 371 of file fvExprDriver.H.
|
explicit |
Default construct, and default construct with search preferences.
Definition at line 89 of file fvExprDriver.C.
|
explicit |
Copy construct with dictionary reference.
Definition at line 105 of file fvExprDriver.C.
|
explicit |
|
virtual |
Destructor.
Definition at line 139 of file fvExprDriver.C.
|
staticprotected |
Determine mesh or region mesh as specified in the dictionary with the keyword "region".
Definition at line 502 of file fvExprDriver.C.
References DebugInFunction, dict, Foam::endl(), FatalErrorInFunction, mesh, meshPtr, IOobjectOption::MUST_READ, Foam::nl, IOobjectOption::NO_WRITE, regionName, IOobjectOption::REGISTER, and WarningInFunction.

Default boundary type is calculated.
Definition at line 230 of file fvExprDriver.H.
|
inlinestaticprotected |
Default boundary type for volume fields is zeroGradient since they are essentially just internal fields.
Definition at line 241 of file fvExprDriver.H.
|
inlinestaticprotected |
Apply correctBoundaryConditions (volume fields only)
Definition at line 253 of file fvExprDriver.H.
|
inlinestaticprotected |
Definition at line 257 of file fvExprDriver.H.
References fld.
|
protectedpure virtual |
The mesh we are attached to.
Implemented in parseDriver, and parseDriver.
|
inlineprotected |
Define scopes for global variables.
Definition at line 280 of file fvExprDriver.H.
Referenced by fvExprDriver::evaluateVariableRemote().

|
inlineprotectedvirtual |
Non-const access to the named variable (sub-classes only)
Reimplemented from exprDriver.
Definition at line 52 of file fvExprDriverI.H.
References Foam::name().

|
protected |
Test existence of a global variable.
Definition at line 31 of file fvExprDriverTemplates.C.
References Foam::ensightOutput::debug, DebugInfo, Foam::endl(), Foam::Info, Foam::name(), and Foam::returnReduceAnd().

|
protected |
Return the global variable if available or a null result.
Definition at line 695 of file fvExprDriver.C.
References exprResultGlobals::get(), mesh, and exprResultGlobals::New().

|
protected |
Test for the existence of a mesh field.
| expectSize | ignored |
Definition at line 215 of file fvExprDriverTemplates.C.
References Foam::ensightOutput::debug, and Foam::Info.
|
inlineprotected |
Retrieve field from memory or disk.
|
inlineprotected |
Retrieve point field from memory or disk.
|
protected |
Retrieve field from memory or disk (implementation)
Helper function for getOrReadField.
|
protected |
Get topoSet.
|
inlineprotected |
Update topoSet.
Definition at line 562 of file fvExprDriverTemplates.C.
|
protectedvirtual |
Examine current variable values and update stored variables.
Reimplemented from exprDriver.
Definition at line 233 of file fvExprDriver.C.
References DebugInfo, Foam::endl(), forAllIters, mesh, Foam::nl, and update().

|
protectedvirtual |
Do we need a data file to be written.
Definition at line 703 of file fvExprDriver.C.
|
protectedvirtual |
Prepare/update special variables and add to dictionary, normally via the reader/writer.
Definition at line 719 of file fvExprDriver.C.
References dict, and exprDriver::update().

|
protectedvirtual |
Read data from dictionary, normally via the reader/writer.
Definition at line 710 of file fvExprDriver.C.
References dict.
Referenced by fvExprDriverWriter::readData().

|
static |
Get the default mesh, if one is defined.
Definition at line 54 of file fvExprDriver.C.
References Foam::abort(), Foam::endl(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

|
static |
Set the default mesh (if not already set)
| force | Force reset, even if already set |
Definition at line 70 of file fvExprDriver.C.
References mesh.
| TypeName | ( | "fvExprDriver" | ) |
Runtime type information.
| declareRunTimeSelectionTable | ( | autoPtr | , |
| fvExprDriver | , | ||
| dictionary | , | ||
| (const dictionary &dict, const fvMesh &mesh) | , | ||
| (dict, mesh) | |||
| ) |
| declareRunTimeSelectionTable | ( | autoPtr | , |
| fvExprDriver | , | ||
| idName | , | ||
| (const word &ident, const fvMesh &mesh) | , | ||
| (ident, mesh) | |||
| ) |
|
static |
Return a reference to the selected value driver.
Definition at line 42 of file fvExprDriverNew.C.
References DebugInFunction, dict, Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, and mesh.
Referenced by fvExprDriver::evaluateVariableRemote().


|
static |
Return a reference to the selected value driver.
Definition at line 28 of file fvExprDriverNew.C.
References dict, and Foam::New().

|
static |
Return a reference to the selected value driver.
Definition at line 72 of file fvExprDriverNew.C.
References DebugInFunction, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInLookup, and mesh.

|
virtualdelete |
Not generally clonable.
|
pure virtual |
The natural field size for the expression.
Reimplemented from exprDriver.
Implemented in parseDriver, and parseDriver.
|
pure virtual |
The point field size for the expression.
Reimplemented from exprDriver.
Implemented in parseDriver, and parseDriver.
|
inline |
Status of cache-sets (static variable)
Definition at line 560 of file fvExprDriver.H.
|
virtual |
Clear temporary variables, reset from expression strings.
Reimplemented from exprDriver.
Definition at line 324 of file fvExprDriver.C.
References DebugInfo, Foam::endl(), forAllIters, mesh, and update().

|
inlinevirtual |
True if named variable exists.
Reimplemented from exprDriver.
Definition at line 27 of file fvExprDriverI.H.
References Foam::name().

|
inlinevirtual |
Return const-access to the named variable.
Reimplemented from exprDriver.
Definition at line 37 of file fvExprDriverI.H.
References Foam::name().

|
inline |
Test for existence of a local/global variable or a field.
Definition at line 83 of file fvExprDriverI.H.
References Foam::name().

| tmp<Field<Type> > getVariable | ( | const word & | name, |
| const label | expectSize, | ||
| const bool | mandatory = true |
||
| ) | const |
Retrieve local/global variable as a tmp field.
| name | The name of the local/global field |
| expectSize | The size check on the variable, -1 to ignore |
| mandatory | A missing variable is Fatal, or return an invalid tmp |
| Foam::word getFieldClassName | ( | const word & | name | ) | const |
Lookup the field class name (memory or read from disk)
Return empty if the name cannot be resolved.
Definition at line 563 of file fvExprDriver.C.
References mesh, Foam::name(), and word::null.

| Foam::topoSetSource::sourceType topoSetType | ( | const word & | name | ) | const |
Return cell/face/point set type or unknown.
Definition at line 587 of file fvExprDriver.C.
References topoSet::findIOobject(), io(), and mesh.

| Foam::topoSetSource::sourceType topoZoneType | ( | const word & | name | ) | const |
Return cell/face/point zone type or unknown.
Definition at line 609 of file fvExprDriver.C.
References mesh.
| Foam::topoSetSource::sourceType topoSourceType | ( | const word & | name | ) | const |
Return cell/face/point zone/set type or unknown.
Definition at line 631 of file fvExprDriver.C.
| Foam::refPtr< Foam::labelList > getTopoSetLabels | ( | const word & | name, |
| enum topoSetSource::sourceType | setType | ||
| ) | const |
Get the labels associated with the topo set.
Definition at line 32 of file fvExprDriverIO.C.
References refPtr< T >::cref(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, refPtr< T >::good(), io(), mesh, Foam::name(), Foam::nl, refPtr< T >::reset(), and Foam::BitOps::sortedToc().

| bool isCellZone | ( | const word & | name | ) | const |
Test if name is a known cellZone.
Definition at line 675 of file fvExprDriver.C.
References mesh, and Foam::name().

| bool isFaceZone | ( | const word & | name | ) | const |
Test if name is a known faceZone.
Definition at line 681 of file fvExprDriver.C.
References mesh, and Foam::name().

| bool isPointZone | ( | const word & | name | ) | const |
Test if name is a known pointZone.
Definition at line 687 of file fvExprDriver.C.
References mesh, and Foam::name().

| bool isCellSet | ( | const word & | name | ) | const |
Test if name is a known cellSet.
Definition at line 645 of file fvExprDriver.C.
| bool isFaceSet | ( | const word & | name | ) | const |
Test if name is a known faceSet.
Definition at line 655 of file fvExprDriver.C.
| bool isPointSet | ( | const word & | name | ) | const |
Test if name is a known pointSet.
Definition at line 665 of file fvExprDriver.C.
|
virtual |
Evaluate the expression and save as the specified named variable.
Definition at line 350 of file fvExprDriver.C.
References DebugInfo, Foam::endl(), IOobject::headerClassName(), mesh, Foam::nl, and WarningInFunction.

|
virtual |
Evaluate an expression on a remote and save as the specified named variable.
The fully qualified form of the remote is given as follows
* type'name/region *
If not specified, the default type is "patch", which means the following are equivalent
* patch'name/region * name/region *
If region is identical to the current region, it can be omitted:
* patch'name * name (default is patch) *
Reimplemented from exprDriver.
Definition at line 398 of file fvExprDriver.C.
References objectRegistry::cfindObject(), DebugInfo, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, exprResult::isUniform(), mesh, fvExprDriver::New(), Foam::nl, exprDriver::parse(), regionName, fvExprDriver::setGlobalScopes(), exprDriver::setSearchBehaviour(), exprResult::testIfSingleValue(), fvMesh::time(), and word::validate().

|
inline |
Test existence of a local/global variable.
Definition at line 67 of file fvExprDriverI.H.
References Foam::name().

| bool foundField | ( | const word & | name | ) | const |
Test if specified field can be found in memory or disk.
Definition at line 129 of file fvExprDriverTemplates.C.
References Foam::ensightOutput::debug, Foam::endl(), IOobject::headerClassName(), Foam::Info, mesh, Foam::name(), and Foam::nl.

| Foam::word getTypeOfField | ( | const word & | fieldName | ) | const |
Read the IOobject for fieldName and return its headerClassName.
Empty if the field could not be found.
Definition at line 554 of file fvExprDriver.C.
References mesh.
|
virtual |
Read variables, tables etc.
Also usable for objects not constructed from a dictionary.
Reimplemented from exprDriver.
Reimplemented in parseDriver.
Definition at line 146 of file fvExprDriver.C.
References dict, Foam::endl(), keyType::LITERAL, exprDriver::readDict(), entry::stream(), and WarningInFunction.

| Foam::Ostream & writeCommon | ( | Ostream & | os, |
| bool | debug = false |
||
| ) | const |
Write "variables", "storedVariables", "delayedVariables", "globalScopes" if they are present.
Definition at line 211 of file fvExprDriverIO.C.
References UList< T >::begin(), Foam::ensightOutput::debug, forAllConstIters(), and os().

| void createWriterAndRead | ( | const word & | name | ) |
Create a writer for this object.
Definition at line 264 of file fvExprDriverIO.C.
References Foam::name(), and Foam::type().

| void tryWrite | ( | ) | const |
Write data if appropriate Should enable exact restarts.
Definition at line 273 of file fvExprDriverIO.C.
References mesh.
|
inline |
Definition at line 101 of file fvExprDriverI.H.
References mesh, and Foam::name().

|
inline |
Definition at line 120 of file fvExprDriverI.H.
References mesh, Foam::name(), and Foam::New().

Definition at line 139 of file fvExprDriverI.H.
References DebugInfo, Foam::name(), and Foam::nl.

| Foam::tmp<Foam::Field<Type> > getVariable | ( | const word & | name, |
| const label | expectedSize, | ||
| const bool | mandatory | ||
| ) | const |
Definition at line 71 of file fvExprDriverTemplates.C.
References refPtr< T >::cref(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::gAverage(), Foam::name(), Foam::New(), Foam::nl, Foam::returnReduceAnd(), UList< Type >::size(), refPtr< T >::valid(), and WarningInFunction.

| Foam::tmp<GeomField> getOrReadFieldImpl | ( | const word & | name, |
| const Mesh & | meshRef, | ||
| bool | mandatory, | ||
| bool | getOldTime | ||
| ) |
Definition at line 241 of file fvExprDriverTemplates.C.
| Foam::autoPtr<T> getTopoSet | ( | const fvMesh & | mesh, |
| const word & | name, | ||
| SetOrigin & | origin | ||
| ) | const |
Definition at line 472 of file fvExprDriverTemplates.C.
|
friend |
Definition at line 423 of file fvExprDriver.H.