Go to the documentation of this file.
40 void Foam::schemesLookup::clear()
43 d2dt2Schemes_.clear();
44 interpSchemes_.clear();
47 lnGradSchemes_.clear();
48 snGradSchemes_.clear();
49 laplacianSchemes_.clear();
55 void Foam::schemesLookup::checkSteady()
57 ITstream& is = ddtSchemes_.fallback();
60 if (is.peek().isWord())
67 schemeName ==
"steady"
68 || schemeName ==
"steadyState"
75 ddtSchemes_.populate(
dict,
"none");
76 d2dt2Schemes_.populate(
dict,
"none");
77 interpSchemes_.populate(
dict,
"linear");
78 divSchemes_.populate(
dict,
"",
true);
79 gradSchemes_.populate(
dict,
"",
true);
80 lnGradSchemes_.populate(
dict,
"corrected");
81 snGradSchemes_.populate(
dict,
"corrected");
82 laplacianSchemes_.populate(
dict,
"",
true);
84 const dictionary* fluxDictPtr =
dict.
findDict(
"fluxRequired");
87 fluxRequired_.
merge(*fluxDictPtr);
89 if (fluxRequired_.found(
"default"))
91 Switch sw(fluxRequired_.lookup(
"default").peek());
95 fluxRequiredDefault_ =
bool(sw);
106 Foam::schemesLookup::schemesLookup
133 ddtSchemes_(
"ddtSchemes", objectPath()),
134 d2dt2Schemes_(
"d2dt2Schemes", objectPath()),
135 interpSchemes_(
"interpolationSchemes", objectPath()),
136 divSchemes_(
"divSchemes", objectPath()),
137 gradSchemes_(
"gradSchemes", objectPath()),
138 lnGradSchemes_(
"lnGradSchemes", objectPath()),
139 snGradSchemes_(
"snGradSchemes", objectPath()),
140 laplacianSchemes_(
"laplacianSchemes", objectPath()),
142 fluxRequired_(objectPath() +
".fluxRequired"),
143 fluxRequiredDefault_(
false),
188 return ddtSchemes_.lookup(
name);
195 return d2dt2Schemes_.lookup(
name);
202 return interpSchemes_.lookup(
name);
209 return divSchemes_.lookup(
name);
216 return gradSchemes_.lookup(
name);
223 return lnGradSchemes_.lookup(
name);
230 return snGradSchemes_.lookup(
name);
237 return laplacianSchemes_.lookup(
name);
244 fluxRequired_.add(
name,
true,
true);
251 return (fluxRequired_.found(
name) || fluxRequiredDefault_);
257 ddtSchemes_.writeEntryOptional(
os);
258 d2dt2Schemes_.writeEntryOptional(
os);
259 interpSchemes_.writeEntryOptional(
os);
260 divSchemes_.writeEntry(
os);
261 gradSchemes_.writeEntry(
os);
262 lnGradSchemes_.writeEntryOptional(
os);
263 snGradSchemes_.writeEntryOptional(
os);
264 laplacianSchemes_.writeEntry(
os);
266 if (!fluxRequired_.empty())
268 fluxRequired_.writeEntry(
os);
dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
Find and return a sub-dictionary pointer if present.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling words, derived from Foam::string.
int debugSwitch(const char *name, const int deflt=0)
Lookup debug switch or add default value.
bool read(const char *buf, int32_t &val)
Same as readInt32.
const word dictName("faMeshDefinition")
ITstream & gradScheme(const word &name) const
Get grad scheme for given name, or default.
virtual bool read()
Read object.
void setFluxRequired(const word &name) const
Get flux-required for given name, or default.
const dictionary & schemesDict() const
The current schemes dictionary, respects the "select" keyword.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Registry of regIOobjects.
ITstream & laplacianScheme(const word &name) const
Get laplacian scheme for given name, or default.
bool merge(const dictionary &dict)
Merge entries from the given dictionary.
const dictionary & fluxRequired() const noexcept
Access to flux required dictionary.
An input stream of tokens.
ITstream & interpolationScheme(const word &name) const
Get interpolation scheme for given name, or default.
Lookup type of boundary radiation properties.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
OBJstream os(runTime.globalPath()/outputName)
ITstream & snGradScheme(const word &name) const
Get (finiteVolume) snGrad scheme for given name, or default.
ITstream & divScheme(const word &name) const
Get div scheme for given name, or default.
readOption readOpt() const noexcept
The read option.
const word & system() const
Return system name.
#define DebugInfo
Report an information message using Foam::Info.
ITstream & ddtScheme(const word &name) const
Get ddt scheme for given name, or default.
static int debug
Debug switch.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
bool read()
Read schemes from IOdictionary, respects the "select" keyword.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void writeDicts(Ostream &os) const
Write dictionary (possibly modified) settings.
ITstream & d2dt2Scheme(const word &name) const
Get d2dt2 scheme for given name, or default.
const Time & time() const noexcept
Return time registry.
ITstream & lnGradScheme(const word &name) const
Get (finiteArea) lnGrad scheme for given name, or default.