Go to the documentation of this file.
54 if (
dict.found(
"cache"))
60 if (
dict.found(
"relaxationFactors"))
63 if (relaxDict.
found(
"fields") || relaxDict.
found(
"equations"))
65 if (relaxDict.
found(
"fields"))
70 if (relaxDict.
found(
"equations"))
83 const word&
e = entryNames[i];
90 else if (
e.length() >= 3)
111 Info<<
"relaxation factors:" <<
nl
118 if (
dict.found(
"solvers"))
154 fieldRelaxDefault_(0),
184 if (!iter().isDict())
195 else if (
name ==
"ICCG")
209 forAll(subDictNames, dictI)
214 if (ePtr && !ePtr->
isDict())
235 Info<<
"// using new solver syntax:\n"
236 << iter().keyword() << subdict <<
endl;
240 dict.
set(iter().keyword(), subdict);
259 return cache_.found(
name);
272 Info<<
"Field relaxation factor for " <<
name
273 <<
" is " << (fieldRelaxDict_.found(
name) ?
"set" :
"unset")
277 return fieldRelaxDict_.found(
name) || fieldRelaxDict_.found(
"default");
285 Info<<
"Find equation relaxation factor for " <<
name <<
endl;
288 return eqnRelaxDict_.found(
name) || eqnRelaxDict_.found(
"default");
296 Info<<
"Lookup variable relaxation factor for " <<
name <<
endl;
299 if (fieldRelaxDict_.found(
name))
303 else if (fieldRelaxDefault_ > SMALL)
305 return fieldRelaxDefault_;
312 ) <<
"Cannot find variable relaxation factor for '" <<
name
313 <<
"' or a suitable default value."
325 Info<<
"Lookup equation relaxation factor for " <<
name <<
endl;
328 if (eqnRelaxDict_.found(
name))
332 else if (eqnRelaxDefault_ > SMALL)
334 return eqnRelaxDefault_;
341 ) <<
"Cannot find equation relaxation factor for '" <<
name
342 <<
"' or a suitable default value."
368 <<
"Lookup solver for " <<
name <<
endl;
371 return solvers_.subDict(
name);
380 <<
"Lookup solver for " <<
name <<
endl;
383 return solvers_.subDict(
name);
A keyword and a list of tokens is an 'entry'.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOobject defines the attributes of an object for which implicit objectRegistry management is supporte...
#define InfoInFunction
Report a information message using Foam::Info.
const dictionary & solverDict(const word &name) const
Return the solver controls dictionary for the given field.
A class for handling words, derived from string.
#define forAllIter(Container, container, iter)
Iterate across all elements in the container object of type.
A class for handling file names.
virtual ITstream & stream() const =0
Return token stream if this entry is a primitive entry.
defineDebugSwitchWithName(pointMVCWeight, "pointMVCWeight", 0)
#define forAll(list, i)
Loop across all elements in list.
bool cache(const word &name) const
Return true if the given field should be cached.
dictionary cache_
Dictionary of temporary fields to cache.
bool eof() const
Return true if end of input seen.
static dictionary solverDict(const scalar tol, const scalar relTol)
Return the dictionary constructed from the components.
bool read(const char *, int32_t &)
const Time & time() const
Return time.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
virtual bool read()
Read object.
static label upgradeSolverDict(dictionary &dict, const bool verbose=true)
Update from older solver controls syntax.
T lookupOrDefault(const word &, const T &, bool recursive=false, bool patternMatch=true) const
Find and return a T,.
dictionary solvers_
Dictionary of solver parameters for all the fields.
solution(const solution &)
Disallow default bitwise copy construct and assignment.
Ostream & endl(Ostream &os)
Add newline and flush stream.
dictionary fieldRelaxDict_
Dictionary of relaxation factors for all the fields.
static dictionary solverDict(const scalar tol, const scalar relTol)
Return the dictionary constructed from the components.
Registry of regIOobjects.
const word dictName("particleTrackDict")
scalar eqnRelaxDefault_
Optional default relaxation factor for all the equations.
scalar fieldRelaxationFactor(const word &name) const
Return the relaxation factor for the given field.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
virtual bool isDict() const
Return true if this entry is a dictionary.
const word & system() const
Return system name.
readOption readOpt() const
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
dictionary eqnRelaxDict_
Dictionary of relaxation factors for all the equations.
bool read()
Read the solution dictionary.
scalar fieldRelaxDefault_
Optional default relaxation factor for all the fields.
A list of keyword definitions, which are a keyword followed by any number of values (e....
bool relaxEquation(const word &name) const
Return true if the relaxation factor is given for the equation.
bool caching_
Switch for the caching mechanism.
Input from memory buffer stream.
const double e
Elementary charge.
static int debug
Debug switch.
errorManipArg< error, int > exit(error &err, const int errNo=1)
scalar equationRelaxationFactor(const word &name) const
Return the relaxation factor for the given eqation.
static bool master(const label communicator=0)
Am I the master process.
const entry * lookupEntryPtr(const word &, bool recursive, bool patternMatch) const
Find and return an entry data stream pointer if present.
const dictionary & solutionDict() const
Return the selected sub-dictionary of solvers if the "select".
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
const dictionary & solver(const word &name) const
Return the solver controls dictionary for the given field.
fvSolution solutionDict(runTime)
wordList toc() const
Return the table of contents.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
void clear()
Clear the dictionary.
bool relaxField(const word &name) const
Return true if the relaxation factor is given for the field.
word name(const complex &)
Return a string representation of a complex.
static const dictionary null
Null dictionary.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
stressControl lookup("compactNormalStress") >> compactNormalStress
void set(entry *)
Assign a new entry, overwrite any existing entry.