Base driver for parsing (field) values. More...
Public Types | |
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... | |
Public Member Functions | |
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... | |
virtual label | size () const |
The natural field size for the expression. More... | |
virtual label | pointSize () const |
The point field size for the expression. 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 |
virtual void | clearVariables () |
Clear temporary variables, reset from expression strings. More... | |
void | setArgument (const scalar val) noexcept |
Set special-purpose scalar reference argument. 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... | |
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... | |
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 > | |
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... | |
virtual bool | readDict (const dictionary &dict) |
Read variables, tables etc. 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 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 Member Functions | |
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... | |
virtual exprResult & | variable (const word &name) |
Non-const access to the named variable (sub-classes only) 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 void | updateSpecialVariables (bool force=false) |
Examine current variable values and update stored variables. More... | |
virtual exprResult | getRemoteResult (const exprDriver &other) const |
Get the result from another driver. More... | |
Static Protected Member Functions | |
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... | |
Protected Attributes | |
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 (field) values.
Largely based on code and ideas from swak4foam
Properties
Property | Description | Required | Default |
---|---|---|---|
variables | List of variables for expressions | no | () |
functions<scalar> | Dictionary of scalar Function1 | no | {} |
functions<vector> | Dictionary of vector Function1 | 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 |
The functions<scalar>
and functions<vector>
entries are dictionaries of Foam::Function1 definitions that can either be used to establish a time-varying quantity, to remap a field of scalar values, or both.
Definition at line 136 of file exprDriver.H.
typedef HashTable<const regIOobject*> contextObjectTableType |
Externally defined context fields.
Definition at line 158 of file exprDriver.H.
enum searchControls |
Search/caching controls.
Enumerator | |
---|---|
NO_SEARCH | |
SEARCH_REGISTRY | Search registry before disk. |
SEARCH_FILES | Search disk (eg, standalone app) |
CACHE_READ_FIELDS | Cache fields read from disk. |
DEFAULT_SEARCH |
Definition at line 145 of file exprDriver.H.
|
delete |
No copy construct.
|
explicit |
Default construct, and default construct with search preferences.
Definition at line 167 of file exprDriver.C.
exprDriver | ( | const exprDriver & | rhs, |
const dictionary & | dict | ||
) |
Copy construct with new dictionary reference.
Definition at line 194 of file exprDriver.C.
References exprDriver::scalarFuncs_, Foam::shallowCloneFunctions(), and exprDriver::vectorFuncs_.
|
explicit |
|
virtualdefault |
Destructor.
|
inlineprotectednoexcept |
Definition at line 137 of file exprDriverI.H.
|
inlineprotectednoexcept |
Definition at line 143 of file exprDriverI.H.
|
inlineprotectednoexcept |
Definition at line 149 of file exprDriverI.H.
|
protected |
Reset the time-state reference.
Definition at line 123 of file exprDriver.C.
|
protected |
Reset the time-state reference.
Definition at line 129 of file exprDriver.C.
|
protected |
Write scalar/vector Function1 entries in dictionary format.
Definition at line 215 of file exprDriverFunctions.C.
References os().
|
inlineprotectedvirtual |
Non-const access to the named variable (sub-classes only)
Reimplemented in fvExprDriver.
Definition at line 57 of file exprDriverI.H.
References Foam::name().
|
protected |
Fill a random field.
field | the field to populate |
seed | the seed value. If zero or negative, use as an offset to the current timeIndex (if a time-state is available) |
gaussian | generate a Gaussian distribution |
Definition at line 29 of file exprDriverFields.C.
References Foam::FieldOps::assign(), field(), and TimeState::timeIndex().
Referenced by parseDriver::field_rand().
|
staticprotected |
The (global) weighted average of a field, with stabilisation.
Referenced by parseDriver::areaAverage(), and parseDriver::volAverage().
|
staticprotected |
The (global) weighted sum (integral) of a field.
Referenced by parseDriver::areaSum(), and parseDriver::volSum().
|
staticprotected |
Return the location of the min value.
Definition at line 63 of file exprDriverFields.C.
References Foam::FieldOps::findMinData().
|
staticprotected |
Return the location of the max value.
Definition at line 73 of file exprDriverFields.C.
References Foam::FieldOps::findMaxData().
|
protectedvirtual |
Update things.
Definition at line 314 of file exprDriver.C.
Referenced by fvExprDriver::prepareData().
|
protectedvirtual |
Examine current variable values and update stored variables.
Reimplemented in fvExprDriver.
Definition at line 320 of file exprDriver.C.
|
protectedvirtual |
Get the result from another driver.
Override to allow mapping
Definition at line 362 of file exprDriver.C.
References exprResult::getUniform(), and exprDriver::result().
TypeName | ( | "exprDriver" | ) |
Runtime type information.
|
delete |
No copy assignment.
|
inlinevirtual |
The natural field size for the expression.
Reimplemented in fvExprDriver, parseDriver, parseDriver, and parseDriver.
Definition at line 443 of file exprDriver.H.
|
inlinevirtual |
The point field size for the expression.
Reimplemented in fvExprDriver, parseDriver, parseDriver, and parseDriver.
Definition at line 451 of file exprDriver.H.
|
noexcept |
Reference to the current time-state (can be nullptr)
Definition at line 247 of file exprDriver.C.
|
virtual |
The current time value.
Definition at line 261 of file exprDriver.C.
|
virtual |
The current deltaT value.
Definition at line 275 of file exprDriver.C.
|
inlinenoexcept |
The dictionary with all input data/specification.
Definition at line 475 of file exprDriver.H.
References exprDriver::dict_.
|
inlinenoexcept |
Const access to expression result.
Definition at line 483 of file exprDriver.H.
References exprDriver::result_.
Referenced by Foam::stringOps::evaluate(), exprDriver::getRemoteResult(), and parseDriver::setResult().
|
inlinenoexcept |
Non-const access to expression result.
Definition at line 491 of file exprDriver.H.
References exprDriver::result_.
void clearResult | ( | ) |
Clear the result.
Definition at line 308 of file exprDriver.C.
Return the expression result as a tmp field.
This also clears the result and associated memory.
|
inlinenoexcept |
The result type as word - same as result().valueType()
Definition at line 512 of file exprDriver.H.
References exprDriver::result_, and exprResult::valueType().
void resetDb | ( | const objectRegistry * | obrPtr = nullptr | ) |
Reset the objectRegistry (for functions)
Definition at line 135 of file exprDriver.C.
References forAllIters.
void resetDb | ( | const objectRegistry & | db | ) |
Reset the objectRegistry (for functions)
Definition at line 158 of file exprDriver.C.
|
inlinenoexcept |
Get special-purpose scalar reference argument.
Typically available as arg()
in an expression and may correspond to table index, time value etc.
Definition at line 30 of file exprDriverI.H.
References exprDriver::arg1Value_.
|
inlinenoexcept |
Get "look-behind" parsing context (internal bookkeeping)
Definition at line 108 of file exprDriverI.H.
|
inlinenoexcept |
Reset "look-behind" parsing context (mutable operation)
Definition at line 115 of file exprDriverI.H.
void setDebugging | ( | bool | scannerDebug, |
bool | parserDebug | ||
) |
Set the scanner/parser debug.
Definition at line 486 of file exprDriver.C.
void setDebugging | ( | const exprDriver & | rhs | ) |
Set the scanner/parser debug to match the input.
Definition at line 497 of file exprDriver.C.
References exprDriver::debugParser_, and exprDriver::debugScanner_.
|
noexcept |
Toggle CACHE_READ_FIELDS control.
Definition at line 506 of file exprDriver.C.
void setSearchBehaviour | ( | enum searchControls | search, |
const bool | caching = false |
||
) |
Set search behaviour, with additional CACHE_READ_FIELDS toggle on.
Definition at line 535 of file exprDriver.C.
References Foam::Info, Foam::nl, and Foam::search().
Referenced by fvExprDriver::evaluateVariableRemote().
void setSearchBehaviour | ( | const exprDriver & | rhs | ) |
Set search behaviour to be identical to rhs.
Definition at line 563 of file exprDriver.C.
References exprDriver::searchCtrl_.
|
inlinenoexcept |
Read access to scanner debug.
Definition at line 125 of file exprDriverI.H.
|
inlinenoexcept |
Read access to parser debug.
Definition at line 131 of file exprDriverI.H.
|
inline |
Definition at line 597 of file exprDriver.H.
References exprDriver::prevIterIsOldTime_.
|
virtual |
Clear temporary variables, reset from expression strings.
Reimplemented in fvExprDriver.
Definition at line 324 of file exprDriver.C.
|
inlinenoexcept |
Set special-purpose scalar reference argument.
Typically available as arg()
in an expression and may corrspond to table index, time value etc.
Definition at line 24 of file exprDriverI.H.
|
inlinevirtual |
True if named variable exists.
Reimplemented in fvExprDriver.
Definition at line 37 of file exprDriverI.H.
References Foam::name().
|
inlinevirtual |
Return const-access to the named variable.
Reimplemented in fvExprDriver.
Definition at line 47 of file exprDriverI.H.
References Foam::name().
void addVariables | ( | const expressions::exprString & | expr, |
bool | clear = true |
||
) |
Add/set string expressions for variables.
Can include multiple definitions inline
clear | Remove previously defined variables |
Definition at line 372 of file exprDriver.C.
References clear(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::FatalIOError, FatalIOErrorInFunction, Foam::stringOps::inplaceTrim(), Foam::nl, exprString::toExpr(), Foam::stringOps::trim(), and word::validate().
void addVariables | ( | const UList< expressions::exprString > & | list, |
bool | clear = true |
||
) |
Add/set string expressions for variables.
Can include multiple definitions inline
clear | Remove previously defined variables |
Definition at line 468 of file exprDriver.C.
References clear().
Add a uniform variable from an outside caller.
|
inline |
True if any context fields are defined.
Definition at line 23 of file exprDriverContextI.H.
References exprDriver::contextObjects_, and HashTable< T, Key, Hash >::empty().
|
inline |
Find named context field, if it exists.
Definition at line 31 of file exprDriverContextI.H.
References Foam::name().
Referenced by parseDriver::getField(), parseDriver::patchInternalField(), parseDriver::patchNeighbourField(), and parseDriver::patchNormalField().
const ObjType * cfindContextObject | ( | const word & | name | ) | const |
Find context field object of specified type.
Definition at line 106 of file exprDriverContextI.H.
References Foam::name().
|
inline |
Add the object to the context.
Definition at line 41 of file exprDriverContextI.H.
References Foam::name().
|
inline |
Add the object to the context.
Definition at line 58 of file exprDriverContextI.H.
References IOobject::name().
|
inline |
Remove the object from the context.
Definition at line 70 of file exprDriverContextI.H.
References Foam::name().
|
inline |
Remove the object from the context.
Definition at line 79 of file exprDriverContextI.H.
References IOobject::name().
|
inlinenoexcept |
Read access to the object context.
Definition at line 91 of file exprDriverContextI.H.
|
inlinenoexcept |
Write access to the object context.
Definition at line 98 of file exprDriverContextI.H.
bool isFunction | ( | const word & | name | ) | const |
Named mapping with given type exists.
Definition at line 128 of file exprDriverTemplates.C.
References doLocalCode.
Type getFunctionValue | ( | const word & | name, |
const scalar | x | ||
) | const |
Evaluate named mapping for the given time/value. Zero for undefined/unknown.
Definition at line 154 of file exprDriverTemplates.C.
References doLocalCode, UList< T >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), Foam::name(), Foam::nl, Function1< Type >::value(), and x.
void fillFunctionValues | ( | Field< Type > & | result, |
const word & | name, | ||
const scalarField & | input | ||
) | const |
Fill result with values remapped according to the named Function1.
Definition at line 207 of file exprDriverTemplates.C.
References doLocalCode, UList< T >::empty(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::flatOutput(), Foam::input(), Foam::min(), Foam::name(), Foam::nl, UList< Type >::size(), Function1< Type >::value(), and Foam::Zero.
bool isLocalVariable | ( | const word & | name, |
bool | wantPointData = false , |
||
label | expectedSize = -1 |
||
) | const |
Test existence of a local variable.
Definition at line 278 of file exprDriverTemplates.C.
References Foam::ensightOutput::debug, DebugInfo, Foam::endl(), Foam::Info, exprResult::isPointData(), exprResult::isType(), Foam::name(), Foam::returnReduceAnd(), exprResult::size(), and exprResult::valueType().
tmp<Field<Type> > getLocalVariable | ( | const word & | name, |
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 |
|
pure virtual |
Execute the parser.
The return value currently has no meaning.
Implemented in parseDriver, parseDriver, and parseDriver.
Referenced by fvExprDriver::evaluateVariableRemote().
|
inline |
Evaluate the expression and return the field.
This also clears the result and associated memory.
|
inline |
Evaluate the expression and return a single value.
Does not clear the result.
Definition at line 94 of file exprDriverI.H.
void evaluateVariable | ( | const word & | varName, |
const expressions::exprString & | expr | ||
) |
Evaluate the expression and save as the specified named variable.
Definition at line 332 of file exprDriver.C.
References DebugInfo, and Foam::endl().
|
virtual |
Evaluate an expression on a remote and save as the specified named variable.
Reimplemented in fvExprDriver.
Definition at line 350 of file exprDriver.C.
References NotImplemented.
Return a new field with the size()
Return a new field with the pointSize()
|
static |
Read an expression string and do substitutions.
Definition at line 68 of file exprDriverIO.C.
References dict, and Foam::name().
|
static |
Read the list of variable strings.
(or initialize with a single string)
Definition at line 89 of file exprDriverIO.C.
References dict, and Foam::exprTools::getList().
Foam::expressions::exprString readExpression | ( | const word & | name | ) |
Read an expression string (with the current dictionary) and do substitutions.
Definition at line 79 of file exprDriverIO.C.
References dict, and Foam::name().
|
virtual |
Read variables, tables etc.
Also usable for objects not constructed from a dictionary.
Reimplemented in fvExprDriver, and parseDriver.
Definition at line 290 of file exprDriver.C.
References Foam::ensightOutput::debug, and dict.
Referenced by fvExprDriver::readDict().
Foam::label setVariableStrings | ( | const dictionary & | dict, |
bool | mandatory = false |
||
) |
Read "variables" and assigns to the list of expression strings.
Definition at line 100 of file exprDriverIO.C.
References dict.
Foam::Ostream & writeVariableStrings | ( | Ostream & | os, |
const word & | keyword = "" |
||
) | const |
Write "variables".
Definition at line 112 of file exprDriverIO.C.
References os(), and Foam::vtk::writeList().
|
inline |
Definition at line 67 of file exprDriverI.H.
References Foam::name(), and exprResult::setSingleValue().
Foam::tmp<Foam::Field<Type> > evaluate | ( | const expressions::exprString & | expr, |
bool | wantPointData | ||
) |
Definition at line 80 of file exprDriverI.H.
Foam::tmp<Foam::Field<Type> > getResult | ( | bool | wantPointData | ) |
Definition at line 84 of file exprDriverTemplates.C.
References Foam::exit(), Foam::FatalError, FatalErrorInFunction, exprResult::getResult(), exprResult::isPointData(), Foam::nl, and exprDriver::result_.
const Foam::Function1<Type>* getFunction1Ptr | ( | const word & | name, |
const HashTable< refPtr< Function1< Type >>> & | tbl, | ||
wordList * | listFailure | ||
) |
Definition at line 103 of file exprDriverTemplates.C.
References Foam::name().
Foam::tmp<Foam::Field<Type> > newField | ( | const Type & | val | ) | const |
Definition at line 323 of file exprDriverTemplates.C.
References Foam::New().
Foam::tmp<Foam::Field<Type> > newPointField | ( | const Type & | val | ) | const |
Definition at line 334 of file exprDriverTemplates.C.
References Foam::New().
|
protected |
The dictionary with all input data/specification.
Definition at line 196 of file exprDriver.H.
Referenced by exprDriver::dict().
|
protected |
The result.
Definition at line 201 of file exprDriver.H.
Referenced by exprDriver::getResult(), exprDriver::getResultType(), and exprDriver::result().
|
protected |
Variable definitions, as read from a dictionary.
Definition at line 206 of file exprDriver.H.
|
protected |
The variables table.
Definition at line 211 of file exprDriver.H.
Function1 mappings/timelines (scalar), evaluated at the simulation time or with arbitrary scalars.
Definition at line 217 of file exprDriver.H.
Referenced by exprDriver::exprDriver().
Function1 mappings/timelines (vector), evaluated at the simulation time or with arbitrary scalars.
Definition at line 223 of file exprDriver.H.
Referenced by exprDriver::exprDriver().
|
protected |
Externally defined context fields.
Definition at line 228 of file exprDriver.H.
Referenced by exprDriver::hasContextObjects().
|
protected |
Special-purpose scalar reference argument.
Definition at line 233 of file exprDriver.H.
Referenced by exprDriver::argValue().
|
mutableprotected |
Reference to the time-state.
Definition at line 238 of file exprDriver.H.
|
protected |
Pointer to an object registry (for functions etc).
Definition at line 243 of file exprDriver.H.
|
mutableprotected |
Internal bookkeeping as "look-behind" parsing context.
Definition at line 251 of file exprDriver.H.
|
protected |
Request debugging for scanner.
Definition at line 256 of file exprDriver.H.
Referenced by exprDriver::setDebugging().
|
protected |
Request debugging for parser.
Definition at line 261 of file exprDriver.H.
Referenced by exprDriver::setDebugging().
|
protected |
Allow variable names to mask field names.
Definition at line 266 of file exprDriver.H.
|
protected |
Use value of previous iteration when oldTime is requested.
Definition at line 271 of file exprDriver.H.
Referenced by exprDriver::prevIterIsOldTime().
|
protected |
Registry/disk/caching control.
Definition at line 276 of file exprDriver.H.
Referenced by exprDriver::setSearchBehaviour().