45 mesh_(control.mesh()),
62 control_.dict().subOrEmptyDict(
"residualControl")
69 const word& fName = iter().keyword();
74 <<
"Solution convergence criteria specified in "
75 << control_.algorithmName() <<
'.' << residualDict.
dictName()
76 <<
" must be given as single values. Corrector loop "
77 <<
"convergence criteria, if appropriate, are specified as "
78 <<
"dictionaries in " << control_.algorithmName()
83 residualControlIndex(fName, residualControl_,
false);
87 rd.
name = fName.c_str();
100 if (control_.debug > 1)
102 forAll(residualControl_, i)
106 <<
" name : " << rd.
name <<
nl
119 Info<< control_.algorithmName() <<
": "
120 << (residualControl_.empty() ?
"No c" :
"C")
121 <<
"onvergence criteria found" <<
nl;
123 forAll(residualControl_, i)
125 Info<< control_.algorithmSpace() <<
" " << residualControl_[i].name
126 <<
": tolerance " << residualControl_[i].absTol <<
nl;
135 return !residualControl_.empty();
141 if (!hasResidualControls())
146 bool achieved =
true;
147 bool checked =
false;
151 Info<< control_.algorithmName() <<
": Residuals" <<
endl;
160 residualControlIndex(fieldName, residualControl_);
175 bool absCheck = residual < residualControl_[fieldi].absTol;
177 achieved = achieved && absCheck;
181 Info<< control_.algorithmSpace() <<
" " << fieldName
182 <<
": tolerance " << residual <<
" ("
183 << residualControl_[fieldi].absTol <<
")"
184 << (absCheck ?
" CONVERGED" :
"") <<
endl;
189 return checked && achieved;
#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.
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...
Database for solution and other reduced data.
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....
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.
virtual bool criteriaSatisfied() const
Return true if all convergence checks are satisfied.
void printResidualControls() const
Print the residual controls.
virtual ~singleRegionConvergenceControl()
Destructor.
virtual bool hasResidualControls() const
Return true if residual controls are present.
bool readResidualControls()
Read residual controls.
Single-region-specific derivation of the solution control class.
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)