Convergence control class. Provides methods to check the convergence of the time loop against an absolute residual tolerance. More...
Classes | |
struct | convergenceData |
Convergence data structure. More... | |
struct | residualData |
Classes. More... | |
Public Member Functions | |
TypeName ("convergenceControl") | |
Run-time type information. More... | |
convergenceControl (const solutionControl &control) | |
Construct from a solution control. More... | |
convergenceControl (const convergenceControl &)=delete | |
Disallow default bitwise copy construction. More... | |
virtual | ~convergenceControl () |
Destructor. More... | |
virtual bool | hasResidualControls () const =0 |
Return true if residual controls are present. More... | |
virtual convergenceData | criteriaSatisfied () const =0 |
Return true if all convergence checks are satisfied. More... | |
bool | converged () |
Flag to indicate whether convergence has been reached. More... | |
bool | endIfConverged (Time &time) |
End the run if convergence has been reached. More... | |
void | operator= (const convergenceControl &)=delete |
Disallow default bitwise assignment. More... | |
template<class ResidualData > | |
Foam::label | residualControlIndex (const word &fieldName, const List< ResidualData > &residualControl, const bool useRegEx) |
Static Public Member Functions | |
static DynamicList< word > | getFieldNames (const fvMesh &mesh) |
Get the list of names of the fields. More... | |
static void | getInitialResiduals (const fvMesh &mesh, const word &fieldName, const label solvei, scalar &r0, scalar &r) |
Get the initial residuals for the first and the i-th solves in this. More... | |
template<class ResidualData > | |
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. More... | |
template<class Type > | |
static void | getFieldTypeNames (const fvMesh &mesh, DynamicList< word > &fieldNames) |
Append the of names of the fields of this Type to the given list. More... | |
template<class Type > | |
static void | getInitialTypeResiduals (const fvMesh &mesh, const word &fieldName, const label solvei, scalar &r0, scalar &r) |
Get the initial residuals for the first and the i-th solves in this. More... | |
Protected Attributes | |
const solutionControl & | control_ |
Reference to the solution control. More... | |
Convergence control class. Provides methods to check the convergence of the time loop against an absolute residual tolerance.
Definition at line 51 of file convergenceControl.H.
convergenceControl | ( | const solutionControl & | control | ) |
Construct from a solution control.
Definition at line 75 of file convergenceControl.C.
|
delete |
Disallow default bitwise copy construction.
|
virtual |
Destructor.
Definition at line 83 of file convergenceControl.C.
|
static |
Get the list of names of the fields.
for which residual data is available
Definition at line 39 of file convergenceControl.C.
References fieldNames.
Referenced by singleRegionCorrectorConvergenceControl::corrCriteriaSatisfied(), and singleRegionCorrectorConvergenceControl::updateCorrSolveIndex().
|
static |
Get the initial residuals for the first and the i-th solves in this.
time-step
Definition at line 56 of file convergenceControl.C.
Referenced by singleRegionCorrectorConvergenceControl::corrCriteriaSatisfied().
|
static |
Return the index of the named field in residual control data, or -1.
if not present
Referenced by singleRegionCorrectorConvergenceControl::corrCriteriaSatisfied(), singleRegionConvergenceControl::read(), and singleRegionCorrectorConvergenceControl::read().
|
static |
Append the of names of the fields of this Type to the given list.
Definition at line 55 of file convergenceControlTemplates.C.
References List< T >::append(), and fieldNames.
|
static |
Get the initial residuals for the first and the i-th solves in this.
time-step
Definition at line 66 of file convergenceControlTemplates.C.
References Foam::cmptMax(), and objectRegistry::foundObject().
TypeName | ( | "convergenceControl" | ) |
Run-time type information.
|
pure virtual |
Return true if residual controls are present.
Implemented in pimpleMultiRegionControl, and singleRegionConvergenceControl.
|
pure virtual |
Return true if all convergence checks are satisfied.
Implemented in pimpleMultiRegionControl, and singleRegionConvergenceControl.
bool converged | ( | ) |
Flag to indicate whether convergence has been reached.
Definition at line 89 of file convergenceControl.C.
References convergenceControl::convergenceData::checked, Foam::endl(), Foam::Info, Foam::nl, and convergenceControl::convergenceData::satisfied.
bool endIfConverged | ( | Time & | time | ) |
End the run if convergence has been reached.
Definition at line 109 of file convergenceControl.C.
References Time::noWriteNow, Time::setEndTime(), Time::stopAt(), Time::writeAndEnd(), and TimeState::writeTime().
|
delete |
Disallow default bitwise assignment.
Foam::label residualControlIndex | ( | const word & | fieldName, |
const List< ResidualData > & | residualControl, | ||
const bool | useRegEx | ||
) |
Definition at line 31 of file convergenceControlTemplates.C.
References forAll, string::match(), and Foam::name().
|
protected |
Reference to the solution control.
Definition at line 128 of file convergenceControl.H.
Referenced by singleRegionConvergenceControl::read().