Go to the documentation of this file.
51 if (residualControl_.empty())
59 const dictionary& solverDict = mesh_.solverPerformanceDict();
62 const entry& solverPerfDictEntry = *iter;
64 const word& fieldName = solverPerfDictEntry.
keyword();
65 const label fieldi = applyToField(fieldName);
69 Pair<scalar> residuals = maxResidual(solverPerfDictEntry);
73 (residuals.first() < residualControl_[fieldi].absTol);
75 achieved = achieved && absCheck;
79 Info<< algorithmName_ <<
" solution statistics:" <<
endl;
81 Info<<
" " << fieldName <<
": tolerance = "
83 <<
" (" << residualControl_[fieldi].absTol <<
")"
89 return checked && achieved;
95 Foam::simpleControl::simpleControl
109 Info<<
nl << algorithmName_;
111 if (residualControl_.empty())
113 const scalar duration =
114 mesh_.time().endTime().value()
115 - mesh_.time().startTime().value();
117 Info<<
": no convergence criteria found. "
118 <<
"Calculations will run for " << duration <<
" steps."
123 Info<<
": convergence criteria" <<
nl;
124 for (
const fieldData& ctrl : residualControl_)
127 <<
" tolerance " << ctrl.absTol
146 if (initialised_ && criteriaSatisfied())
150 <<
" solution converged in "
159 storePrevIterFields();
int debug
Static debugging option.
A keyword and a list of tokens is an 'entry'.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
A class for handling words, derived from Foam::string.
const keyType & keyword() const
Return keyword.
Base class for solution control classes.
bool read(const char *buf, int32_t &val)
Same as readInt32.
static word timeName(const scalar t, const int precision=precision_)
const word dictName("blockMeshDict")
Ostream & endl(Ostream &os)
Add newline and flush stream.
bool criteriaSatisfied()
Return true if all convergence checks are satisfied.
virtual void setFirstIterFlag(const bool check=true, const bool force=false)
Set the firstIteration flag on the mesh data dictionary.
bool writeAndEnd()
Write the objects now (not at end of iteration) and end the run.
messageStream Info
Information stream (uses stdout - output is on the master only)
virtual bool loop()
SIMPLE loop.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual bool loop()
Return true if run should continue and if so increment time.
Mesh data needed to do the Finite Volume discretisation.
virtual bool read()
Read controls from fvSolution dictionary.
forAllConstIters(mixture.phases(), phase)
Simple convenient storage of field residuals.
bool read()
Read controls from fvSolution dictionary.
defineTypeNameAndDebug(combustionModel, 0)