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