50 const word& fName = iter().keyword();
55 <<
"Solution convergence criteria specified in "
57 <<
" must be given as single values. Corrector loop "
58 <<
"convergence criteria, if appropriate, are specified as "
68 rd.
name = fName.c_str();
87 <<
" name : " << rd.
name <<
nl
104 mesh_(control.mesh()),
123 Info<< control_.algorithmName() <<
": "
124 << (residualControl_.empty() ?
"No c" :
"C")
125 <<
"onvergence criteria found" <<
nl;
127 forAll(residualControl_, i)
129 Info<< control_.algorithmSpace() <<
" " << residualControl_[i].name
130 <<
": tolerance " << residualControl_[i].absTol <<
nl;
139 return !residualControl_.empty();
146 if (!hasResidualControls())
148 return {
false,
false};
155 Info<< control_.algorithmName() <<
": Residuals" <<
endl;
163 const label fieldi = residualControlIndex(fieldName, residualControl_);
178 const bool absCheck = residual < residualControl_[fieldi].absTol;
180 cs.satisfied = cs.satisfied && absCheck;
184 Info<< control_.algorithmSpace() <<
" " << fieldName
185 <<
": tolerance " << residual <<
" ("
186 << residualControl_[fieldi].absTol <<
")"
187 << (absCheck ?
" CONVERGED" :
"") <<
endl;
#define forAll(list, i)
Loop across all elements in list.
#define forAllConstIter(Container, container, iter)
Iterate across all elements in the container object of type.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
void transfer(List< T > &)
Transfer the contents of the argument List into this list.
Convergence control class. Provides methods to check the convergence of the time loop against an abso...
static label residualControlIndex(const word &fieldName, const List< ResidualData > &residualControl, const bool useRegEx=true)
Return the index of the named field in residual control data, or -1.
const solutionControl & control_
Reference to the solution control.
const word dictName() const
Return the local dictionary name (final part of scoped name)
A list of keyword definitions, which are a keyword followed by any number of values (e....
dictionary subOrEmptyDict(const word &, const bool mustRead=false) const
Find and return a sub-dictionary as a copy, or.
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
Single-region-specific derivation of the convergence control class.
singleRegionConvergenceControl(const singleRegionSolutionControl &control)
Construct from a solution control.
void printResidualControls() const
Print the residual controls.
virtual ~singleRegionConvergenceControl()
Destructor.
virtual convergenceData criteriaSatisfied() const
Return true if all convergence checks are satisfied.
virtual bool hasResidualControls() const
Return true if residual controls are present.
List< residualData > residualControl_
List of residual data per field.
virtual bool read()
Read controls.
Single-region-specific derivation of the solution control class.
const word & algorithmName() const
Return the name of the algorithm.
virtual const dictionary & dict() const =0
Return the dictionary.
A class for handling words, derived from string.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static List< word > fieldNames
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
defineTypeNameAndDebug(combustionModel, 0)
Convergence data structure.