57 label nItersOld = nIters_;
58 nIters_ =
dict().
get<label>(
"nIters");
60 if (nIters_ != nItersOld || iter_ == 0)
67 Info<<
"Setting endTime to " << startTime_ + nIters_ <<
endl;
79 Time& time =
const_cast<Time&
>(mesh_.time());
96 const word& managerType,
110 Time& time =
const_cast<Time&
>(mesh_.time());
120 Time& time =
const_cast<Time&
>(mesh_.time());
140 if (initialised_ && criteriaSatisfied())
143 << solver_.solverName()
144 <<
" solution converged in "
159 storePrevIterFields();
163 checkEndTime(isRunning);
168 << solver_.solverName()
169 <<
" solution reached max. number of iterations "
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
SIMPLE control class for single runs (i.e. not optimisation). Time acts as in simpleFoam,...
void writeNow()
Write fields, even if it is not a writeTime.
virtual void readIters()
Set end time if number of iters has changed.
void checkEndTime(bool &isRunning)
virtual bool read()
Read controls from optimisationDict.
SIMPLE control class to supply convergence information/checks for the SIMPLE loop.
virtual bool read()
Read controls from fvSolution dictionary.
scalar deltaTValue() const noexcept
Return time step value.
bool writeTime() const noexcept
True if this is a write time.
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
static word timeName(const scalar t, const int precision=precision_)
virtual void setEndTime(const dimensionedScalar &endTime)
Reset end time.
virtual bool loop()
Return true if run should continue and if so increment time.
virtual dimensionedScalar endTime() const
Return end time.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const Type & value() const
Return const reference to value.
virtual bool write()
Write the output fields.
Mesh data needed to do the Finite Volume discretisation.
virtual bool write(const bool valid=true) const
Write using setting from DB.
virtual void setFirstIterFlag(const bool check=true, const bool force=false)
Set the firstIteration flag on the mesh data dictionary.
Base class for solution control classes.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
bool read(const char *buf, int32_t &val)
Same as readInt32.
messageStream Info
Information stream (stdout output on master, null elsewhere)
Ostream & endl(Ostream &os)
Add newline and flush stream.
static constexpr const zero Zero
Global zero (0)
constexpr char nl
The newline '\n' character (0x0a)