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
121 obr.readOpt() ==
IOobject::MUST_READ
122 || obr.readOpt() ==
IOobject::READ_IF_PRESENT
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)
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)
bool read(const char *buf, int32_t &val)
const word dictName("faMeshDefinition")
int system(const std::string &command, const bool bg=false)
ITstream & gradScheme(const word &name) const
void setFluxRequired(const word &name) const
const dictionary & schemesDict() const
Ostream & endl(Ostream &os)
Registry of regIOobjects.
ITstream & laplacianScheme(const word &name) const
bool merge(const dictionary &dict)
const dictionary & fluxRequired() const noexcept
An input stream of tokens.
ITstream & interpolationScheme(const word &name) const
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
ITstream & divScheme(const word &name) const
readOption readOpt() const noexcept
const word & system() const
ITstream & ddtScheme(const word &name) const
word name(const expressions::valueTypeCode typeCode)
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void writeDicts(Ostream &os) const
ITstream & d2dt2Scheme(const word &name) const
const Time & time() const noexcept
ITstream & lnGradScheme(const word &name) const