48 if (delayedVariables_.found(
name))
50 return delayedVariables_[
name];
53 return variables_[
name];
63 if (delayedVariables_.found(
name))
65 return delayedVariables_[
name];
68 return variables_[
name];
76 const bool wantPointData,
77 const label expectedSize
82 this->isLocalVariable<Type>(
name, wantPointData, expectedSize)
83 || this->isGlobalVariable<Type>(
name, wantPointData, expectedSize)
92 const bool wantPointData,
93 const label expectedSize
99 this->isVariable<Type>(
name, wantPointData, expectedSize)
100 || this->isField<Type>(
name, wantPointData)
105 template<
class GeomField>
110 const bool mandatory,
111 const bool getOldTime
114 return this->getOrReadFieldImpl<GeomField>
124 template<
class GeomField>
129 const bool mandatory,
130 const bool getOldTime
133 return this->getOrReadFieldImpl<GeomField>
143 template<
class GeomField,
class Mesh>
151 GeomField* ptr =
new GeomField
156 meshRef.thisDb().time().timeName(),
165 if (cacheReadFields())
168 <<
"Registering a copy of " <<
name <<
" with mesh" <<
nl;
HashTable< exprResult > variables_
The variables table.
A polymorphic field/result from evaluating an expression.
static const pointMesh & New(const polyMesh &mesh, Args &&... args)
Get existing or create a new MeshObject. Registered with typeName.
constexpr char nl
The newline '\n' character (0x0a)
virtual bool hasVariable(const word &name) const
True if named variable exists.
bool store()
Register object with its registry and transfer ownership to the registry.
Ignore writing from objectRegistry::writeObject()
tmp< GeomField > readAndRegister(const word &name, const MeshRef &meshRef)
Helper function for getOrReadField.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
virtual exprResult & variable(const word &name)
Non-const access to the named variable (sub-classes only)
#define DebugInfo
Report an information message using Foam::Info.
bool isVariable(const word &name, bool wantPointData=false, label expectSize=-1) const
Test existence of a local/global variable.
tmp< GeomField > getOrReadPointField(const word &name, const bool mandatory=true, const bool getOldTime=false)
Retrieve point field from memory or disk.
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
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.
Do not request registration (bool: false)
tmp< GeomField > getOrReadField(const word &name, const bool mandatory=true, const bool getOldTime=false)
Retrieve field from memory or disk.