37 #ifndef convergenceControl_H 38 #define convergenceControl_H 77 const word& fieldName,
88 template<
class Res
idualData>
91 const word& fieldName,
93 const bool useRegEx=
true 110 const word& fieldName,
convergenceControl(const solutionControl &control)
Construct from a solution control.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
static DynamicList< word > getFieldNames(const fvMesh &mesh)
Get the list of names of the fields.
static void getFieldTypeNames(const fvMesh &mesh, DynamicList< word > &fieldNames)
Append the of names of the fields of this Type to the given list.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
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.
static List< word > fieldNames
virtual ~convergenceControl()
Destructor.
A class for handling words, derived from string.
const solutionControl & control_
Reference to the solution control.
Convergence control class. Provides methods to check the convergence of the time loop against an abso...
A wordRe is a word, but can also have a regular expression for matching words.
virtual bool criteriaSatisfied() const =0
Return true if all convergence checks are satisfied.
bool converged()
Flag to indicate whether convergence has been reached.
void operator=(const convergenceControl &)=delete
Disallow default bitwise assignment.
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.
virtual bool hasResidualControls() const =0
Return true if residual controls are present.
Mesh data needed to do the Finite Volume discretisation.
TypeName("convergenceControl")
Run-time type information.
bool endIfConverged(Time &time)
End the run if convergence has been reached.
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.