Single-region-specific derivation of the convergence control class. More...
Public Member Functions | |
TypeName ("singleRegionConvergenceControl") | |
Run-time type information. More... | |
singleRegionConvergenceControl (const singleRegionSolutionControl &control) | |
Construct from a solution control. More... | |
virtual | ~singleRegionConvergenceControl () |
Destructor. More... | |
void | printResidualControls () const |
Print the residual controls. More... | |
virtual bool | hasResidualControls () const |
Return true if residual controls are present. More... | |
virtual convergenceData | criteriaSatisfied () const |
Return true if all convergence checks are satisfied. More... | |
Public Member Functions inherited from convergenceControl | |
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... | |
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) |
Protected Member Functions | |
virtual bool | read () |
Read controls. More... | |
Protected Attributes | |
const fvMesh & | mesh_ |
Reference to the mesh. More... | |
List< residualData > | residualControl_ |
List of residual data per field. More... | |
Protected Attributes inherited from convergenceControl | |
const solutionControl & | control_ |
Reference to the solution control. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from convergenceControl | |
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... | |
Single-region-specific derivation of the convergence control class.
Definition at line 49 of file singleRegionConvergenceControl.H.
singleRegionConvergenceControl | ( | const singleRegionSolutionControl & | control | ) |
Construct from a solution control.
Definition at line 98 of file singleRegionConvergenceControl.C.
References singleRegionConvergenceControl::read().
|
virtual |
Destructor.
Definition at line 113 of file singleRegionConvergenceControl.C.
|
protectedvirtual |
Read controls.
Reimplemented in simpleControl, and pimpleNoLoopControl.
Definition at line 39 of file singleRegionConvergenceControl.C.
References convergenceControl::residualData::absTol, solutionControl::algorithmName(), DynamicList< T, SizeInc, SizeMult, SizeDiv >::append(), convergenceControl::control_, solutionControl::dict(), dictionaryName::dictName(), Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, forAll, forAllConstIter, Foam::Info, dictionary::lookup(), convergenceControl::residualData::name, Foam::nl, singleRegionConvergenceControl::residualControl_, convergenceControl::residualControlIndex(), dictionary::subOrEmptyDict(), and List< T >::transfer().
Referenced by pimpleNoLoopControl::read(), simpleControl::read(), and singleRegionConvergenceControl::singleRegionConvergenceControl().
TypeName | ( | "singleRegionConvergenceControl" | ) |
Run-time type information.
void printResidualControls | ( | ) | const |
Print the residual controls.
Definition at line 119 of file singleRegionConvergenceControl.C.
References Foam::endl(), forAll, Foam::Info, and Foam::nl.
Referenced by pimpleSingleRegionControl::pimpleSingleRegionControl(), and simpleControl::simpleControl().
|
virtual |
Return true if residual controls are present.
Implements convergenceControl.
Definition at line 137 of file singleRegionConvergenceControl.C.
|
virtual |
Return true if all convergence checks are satisfied.
Implements convergenceControl.
Definition at line 144 of file singleRegionConvergenceControl.C.
References Foam::endl(), fieldNames, forAll, and Foam::Info.
|
protected |
Reference to the mesh.
Definition at line 58 of file singleRegionConvergenceControl.H.
|
protected |
List of residual data per field.
Definition at line 61 of file singleRegionConvergenceControl.H.
Referenced by singleRegionConvergenceControl::read().