Go to the documentation of this file.
47 if (residualControl_.empty())
55 const dictionary& solverDict = mesh_.solverPerformanceDict();
58 const word& variableName = iter().keyword();
59 const label fieldI = applyToField(variableName);
62 scalar lastResidual = 0;
63 const scalar residual =
64 maxResidual(variableName, iter().stream(), lastResidual);
68 bool absCheck = residual < residualControl_[fieldI].absTol;
69 achieved = achieved && absCheck;
73 Info<< algorithmName_ <<
" solution statistics:" <<
endl;
75 Info<<
" " << variableName <<
": tolerance = " << residual
76 <<
" (" << residualControl_[fieldI].absTol <<
")"
82 return checked && achieved;
101 <<
" steps." <<
nl <<
endl;
129 Time& time =
const_cast<Time&
>(mesh_.time());
133 if (criteriaSatisfied())
135 Info<<
nl << algorithmName_ <<
" solution converged in "
143 storePrevIterFields();
149 storePrevIterFields();
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from string.
#define forAll(list, i)
Loop across all elements in list.
Base class for solution control classes.
bool read(const char *, int32_t &)
List< fieldData > residualControl_
List of residual data per field.
simpleControl(const simpleControl &)
Disallow default bitwise copy construct.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const Type & value() const
Return const reference to value.
virtual void read()
Read controls from fvSolution dictionary.
bool criteriaSatisfied()
Return true if all convergence checks are satisfied.
forAllConstIter(PtrDictionary< phaseModel >, mixture.phases(), phase)
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word algorithmName_
The dictionary name, e.g. SIMPLE, PIMPLE.
virtual bool loop()
Loop loop.
A list of keyword definitions, which are a keyword followed by any number of values (e....
virtual bool loop()
Return true if run should continue and if so increment time.
Mesh data needed to do the Finite Volume discretisation.
fvMesh & mesh_
Reference to the mesh database.
static word timeName(const scalar, const int precision=precision_)
Return time name of given scalar time.
virtual ~simpleControl()
Destructor.
const Time & time() const
Return the top-level database.
void read()
Read controls from fvSolution dictionary.
virtual dimensionedScalar endTime() const
Return end time.
defineTypeNameAndDebug(combustionModel, 0)