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())
68 schemeName ==
"steady" 69 || schemeName ==
"steadyState" 76 ddtSchemes_.populate(
dict,
"none");
77 d2dt2Schemes_.populate(
dict,
"none");
78 interpSchemes_.populate(
dict,
"linear");
79 divSchemes_.populate(
dict,
"",
true);
80 gradSchemes_.populate(
dict,
"",
true);
81 lnGradSchemes_.populate(
dict,
"corrected");
82 snGradSchemes_.populate(
dict,
"corrected");
83 laplacianSchemes_.populate(
dict,
"",
true);
85 const dictionary* fluxDictPtr =
dict.
findDict(
"fluxRequired");
88 fluxRequired_.
merge(*fluxDictPtr);
90 if (fluxRequired_.found(
"default"))
92 Switch sw(fluxRequired_.lookup(
"default").peek());
96 fluxRequiredDefault_ = bool(sw);
107 Foam::schemesLookup::schemesLookup
130 ddtSchemes_(
"ddtSchemes", objectPath()),
131 d2dt2Schemes_(
"d2dt2Schemes", objectPath()),
132 interpSchemes_(
"interpolationSchemes", objectPath()),
133 divSchemes_(
"divSchemes", objectPath()),
134 gradSchemes_(
"gradSchemes", objectPath()),
135 lnGradSchemes_(
"lnGradSchemes", objectPath()),
136 snGradSchemes_(
"snGradSchemes", objectPath()),
137 laplacianSchemes_(
"laplacianSchemes", objectPath()),
139 fluxRequired_(objectPath() +
".fluxRequired"),
140 fluxRequiredDefault_(false),
161 Foam::schemesLookup::schemesLookup
163 const objectRegistry& obr,
165 const dictionary* fallback
202 return ddtSchemes_.lookup(
name);
209 return d2dt2Schemes_.lookup(
name);
216 return interpSchemes_.lookup(
name);
223 return divSchemes_.lookup(
name);
230 return gradSchemes_.lookup(
name);
237 return lnGradSchemes_.lookup(
name);
244 return snGradSchemes_.lookup(
name);
251 return laplacianSchemes_.lookup(
name);
258 fluxRequired_.add(
name,
true,
true);
265 return (fluxRequired_.found(
name) || fluxRequiredDefault_);
271 ddtSchemes_.writeEntryOptional(
os);
272 d2dt2Schemes_.writeEntryOptional(
os);
273 interpSchemes_.writeEntryOptional(
os);
274 divSchemes_.writeEntry(
os);
275 gradSchemes_.writeEntry(
os);
276 lnGradSchemes_.writeEntryOptional(
os);
277 snGradSchemes_.writeEntryOptional(
os);
278 laplacianSchemes_.writeEntry(
os);
280 if (!fluxRequired_.empty())
282 fluxRequired_.writeEntry(
os);
ITstream & ddtScheme(const word &name) const
Get ddt scheme for given name, or default.
readOption readOpt() const noexcept
Get the read option.
virtual bool read()
Read object.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
int debugSwitch(const char *name, const int deflt=0)
Lookup debug switch or add default value.
const word dictName("faMeshDefinition")
void writeDicts(Ostream &os) const
Write dictionary (possibly modified) settings.
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool headerOk()
Read and check header info. Does not check the headerClassName.
ITstream & d2dt2Scheme(const word &name) const
Get d2dt2 scheme for given name, or default.
const dictionary & fluxRequired() const noexcept
Access to flux required dictionary.
Lookup type of boundary radiation properties.
bool isReadOptional() const noexcept
True if (READ_IF_PRESENT) bits are set.
void setFluxRequired(const word &name) const
Get flux-required for given name, or default.
ITstream & interpolationScheme(const word &name) const
Get interpolation scheme for given name, or default.
bool read(const char *buf, int32_t &val)
Same as readInt32.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
bool merge(const dictionary &dict)
Merge entries from the given dictionary.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
A class for handling words, derived from Foam::string.
Reading required, file watched for runTime modification.
ITstream & gradScheme(const word &name) const
Get grad scheme for given name, or default.
const dictionary & schemesDict() const
The current schemes dictionary, respects the "select" keyword.
#define DebugInfo
Report an information message using Foam::Info.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Selector class for finite area/finite volume differencing schemes.
OBJstream os(runTime.globalPath()/outputName)
virtual void addWatch()
Add file watch on object (if registered and READ_IF_MODIFIED)
ITstream & lnGradScheme(const word &name) const
Get (finiteArea) lnGrad scheme for given name, or default.
ITstream & laplacianScheme(const word &name) const
Get laplacian scheme for given name, or default.
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.
int system(const std::string &command, const bool bg=false)
Execute the specified command via the shell.
Registry of regIOobjects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
static int debug
Debug switch.
An input stream of tokens.
bool read()
Read schemes from IOdictionary, respects the "select" keyword.
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and a sub-dictionary) otherwise return nullptr...
readOption
Enumeration defining read preferences.