Go to the documentation of this file.
39 void Foam::faSchemes::clear()
42 defaultDdtScheme_.
clear();
43 d2dt2Schemes_.
clear();
44 defaultD2dt2Scheme_.
clear();
45 interpolationSchemes_.
clear();
46 defaultInterpolationScheme_.
clear();
48 defaultDivScheme_.
clear();
50 defaultGradScheme_.
clear();
51 lnGradSchemes_.
clear();
52 defaultLnGradScheme_.
clear();
53 laplacianSchemes_.
clear();
54 defaultLaplacianScheme_.
clear();
55 fluxRequired_.
clear();
56 defaultFluxRequired_ =
false;
68 ddtSchemes_.
set(
"default",
"none");
73 ddtSchemes_.found(
"default")
74 && word(ddtSchemes_.lookup(
"default")) !=
"none"
77 defaultDdtScheme_ = ddtSchemes_.lookup(
"default");
88 d2dt2Schemes_.
set(
"default",
"none");
93 d2dt2Schemes_.found(
"default")
94 && word(d2dt2Schemes_.lookup(
"default")) !=
"none"
97 defaultD2dt2Scheme_ = d2dt2Schemes_.lookup(
"default");
103 interpolationSchemes_ =
dict.
subDict(
"interpolationSchemes");
105 else if (!interpolationSchemes_.found(
"default"))
107 interpolationSchemes_.
add(
"default",
"linear");
112 interpolationSchemes_.found(
"default")
113 && word(interpolationSchemes_.lookup(
"default")) !=
"none"
116 defaultInterpolationScheme_ =
117 interpolationSchemes_.lookup(
"default");
125 divSchemes_.found(
"default")
126 && word(divSchemes_.lookup(
"default")) !=
"none"
129 defaultDivScheme_ = divSchemes_.
lookup(
"default");
137 gradSchemes_.found(
"default")
138 && word(gradSchemes_.lookup(
"default")) !=
"none"
141 defaultGradScheme_ = gradSchemes_.
lookup(
"default");
149 else if (!lnGradSchemes_.found(
"default"))
151 lnGradSchemes_.
add(
"default",
"corrected");
156 lnGradSchemes_.found(
"default")
157 && word(lnGradSchemes_.lookup(
"default")) !=
"none"
160 defaultLnGradScheme_ = lnGradSchemes_.lookup(
"default");
164 laplacianSchemes_ =
dict.
subDict(
"laplacianSchemes");
168 laplacianSchemes_.found(
"default")
169 && word(laplacianSchemes_.lookup(
"default")) !=
"none"
172 defaultLaplacianScheme_ = laplacianSchemes_.
lookup(
"default");
182 fluxRequired_.found(
"default")
183 && fluxRequired_.get<word>(
"default") !=
"none"
186 defaultFluxRequired_ = fluxRequired_.get<
bool>(
"default");
204 obr.readOpt() ==
IOobject::MUST_READ
205 || obr.readOpt() ==
IOobject::READ_IF_PRESENT
216 objectPath() +
".ddtSchemes",
222 ddtSchemes_.
name() +
".default",
229 objectPath() +
".d2dt2Schemes",
235 d2dt2Schemes_.
name() +
".default",
238 interpolationSchemes_
242 objectPath() +
".interpolationSchemes",
246 defaultInterpolationScheme_
248 interpolationSchemes_.
name() +
".default",
255 objectPath() +
".divSchemes",
261 divSchemes_.
name() +
".default",
268 objectPath() +
".gradSchemes",
274 gradSchemes_.
name() +
".default",
281 objectPath() +
".snGradSchemes",
287 lnGradSchemes_.
name() +
".default",
294 objectPath() +
".laplacianSchemes",
298 defaultLaplacianScheme_
300 laplacianSchemes_.
name() +
".default",
307 objectPath() +
".fluxRequired",
311 defaultFluxRequired_(false)
361 if (ddtSchemes_.found(
name) || defaultDdtScheme_.empty())
363 return ddtSchemes_.lookup(
name);
367 const_cast<ITstream&
>(defaultDdtScheme_).rewind();
368 return const_cast<ITstream&
>(defaultDdtScheme_);
380 if (d2dt2Schemes_.found(
name) || defaultD2dt2Scheme_.empty())
382 return d2dt2Schemes_.lookup(
name);
386 const_cast<ITstream&
>(defaultD2dt2Scheme_).rewind();
387 return const_cast<ITstream&
>(defaultD2dt2Scheme_);
396 Info<<
"Lookup interpolationScheme for " <<
name <<
endl;
401 interpolationSchemes_.found(
name)
402 || defaultInterpolationScheme_.empty()
405 return interpolationSchemes_.lookup(
name);
409 const_cast<ITstream&
>(defaultInterpolationScheme_).rewind();
410 return const_cast<ITstream&
>(defaultInterpolationScheme_);
422 if (divSchemes_.found(
name) || defaultDivScheme_.empty())
424 return divSchemes_.lookup(
name);
428 const_cast<ITstream&
>(defaultDivScheme_).rewind();
429 return const_cast<ITstream&
>(defaultDivScheme_);
441 if (gradSchemes_.found(
name) || defaultGradScheme_.empty())
443 return gradSchemes_.lookup(
name);
447 const_cast<ITstream&
>(defaultGradScheme_).rewind();
448 return const_cast<ITstream&
>(defaultGradScheme_);
460 if (lnGradSchemes_.found(
name) || defaultLnGradScheme_.empty())
462 return lnGradSchemes_.lookup(
name);
466 const_cast<ITstream&
>(defaultLnGradScheme_).rewind();
467 return const_cast<ITstream&
>(defaultLnGradScheme_);
479 if (laplacianSchemes_.found(
name) || defaultLaplacianScheme_.empty())
481 return laplacianSchemes_.lookup(
name);
485 const_cast<ITstream&
>(defaultLaplacianScheme_).rewind();
486 return const_cast<ITstream&
>(defaultLaplacianScheme_);
498 fluxRequired_.add(
name,
true,
true);
509 if (fluxRequired_.found(
name))
515 return defaultFluxRequired_;
523 os <<
nl <<
"ddtSchemes";
524 ddtSchemes_.write(os,
true);
526 os <<
nl <<
"d2dt2Schemes";
527 d2dt2Schemes_.write(os,
true);
529 os <<
nl <<
"interpolationSchemes";
530 interpolationSchemes_.write(os,
true);
532 os <<
nl <<
"divSchemes";
533 divSchemes_.write(os,
true);
535 os <<
nl <<
"gradSchemes";
536 gradSchemes_.write(os,
true);
538 os <<
nl <<
"lnGradSchemes";
539 lnGradSchemes_.write(os,
true);
541 os <<
nl <<
"laplacianSchemes";
542 laplacianSchemes_.write(os,
true);
544 os <<
nl <<
"fluxRequired";
545 fluxRequired_.write(os,
true);
int debug
Static debugging option.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
const dictionary & schemesDict() const
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A class for handling words, derived from Foam::string.
bool found(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Search for an entry (const access) with the given keyword.
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.
int system(const std::string &command, const bool bg=false)
Execute the specified command via the shell.
virtual bool writeData(Ostream &) const
WriteData function required for regIOobject write operation.
virtual bool read()
Read object.
Ostream & endl(Ostream &os)
Add newline and flush stream.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
Registry of regIOobjects.
ITstream & laplacianScheme(const word &name) const
An input stream of tokens.
messageStream Info
Information stream (uses stdout - output is on the master only)
word name(const complex &c)
Return string representation of complex.
ITstream & divScheme(const word &name) const
const cellModel * lookup(const word &modelName)
Deprecated(2017-11) equivalent to cellModel::ptr static method.
const dictionary & subDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary.
ITstream & interpolationScheme(const word &name) const
ITstream & lnGradScheme(const word &name) const
ITstream & lookup(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
static int debug
Debug switch.
ITstream & ddtScheme(const word &name) const
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
readOption readOpt() const
The read option.
ITstream & d2dt2Scheme(const word &name) const
void clear()
Clear the list, i.e. set size to zero.
entry * add(entry *entryPtr, bool mergeEntry=false)
Add a new entry.
void setFluxRequired(const word &name) const
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void clear()
Clear the dictionary.
ITstream & gradScheme(const word &name) const
bool headerOk()
Read and check header info.
dictionary & fluxRequired()
Return access to flux required.
bool read()
Read the faSchemes.