55 const word& algorithmName
67 pimpleControls_(solvers.size()),
71 bool allSteady =
true, allTransient =
true;
75 pimpleControls_.set(i, &solvers[i].
pimple);
76 pimpleControls_[i].pimpleLoopPtr_ =
this;
78 allSteady = allSteady && solvers[i].mesh.schemes().steady();
79 allTransient = allTransient && solvers[i].mesh.schemes().transient();
87 pimpleControls_[i].printResidualControls();
92 pimpleControls_[i].printCorrResidualControls(
nCorr_);
97 << (allSteady ?
"steady-state" : allTransient ?
"transient" :
98 "mixed steady-state/transient") <<
" mode with " <<
nCorr_
99 <<
" outer corrector" << (
nCorr_ == 1 ?
"" :
"s") <<
nl;
101 if ((allSteady || allTransient) &&
nCorr_ == 1)
104 << (allSteady ?
"SIMPLE" :
"PISO") <<
" mode" <<
nl;
117 forAll(pimpleControls_, i)
119 pimpleControls_[i].pimpleLoopPtr_ =
nullptr;
130 forAll(pimpleControls_, i)
132 result = result || pimpleControls_[i].hasResidualControls();
143 forAll(pimpleControls_, i)
145 result = result || pimpleControls_[i].hasCorrResidualControls();
157 forAll(pimpleControls_, i)
161 cs.checked = csi.
checked || cs.checked;
164 cs.satisfied = csi.
satisfied && cs.satisfied;
176 forAll(pimpleControls_, i)
178 result = pimpleControls_[i].corrCriteriaSatisfied() && result;
187 forAll(pimpleControls_, i)
189 pimpleControls_[i].resetCorrSolveIndex();
196 forAll(pimpleControls_, i)
198 pimpleControls_[i].updateCorrSolveIndex();
207 forAll(pimpleControls_, i)
209 pimpleControls_[i].updateFinal
211 pimpleControls_[i].isFinal(finalIter())
218 forAll(pimpleControls_, i)
220 pimpleControls_[i].storePrevIterFields();
223 forAll(pimpleControls_, i)
225 pimpleControls_[i].updateFinal
227 pimpleControls_[i].isFinal(finalIter())
237 if (Ecorr_ >= nEcorr_)
251 if (!endIfConverged(
time))
253 forAll(pimpleControls_, i)
255 pimpleControls_[i].storePrevIterFields();
265 if (!endIfConverged(
time))
267 forAll(pimpleControls_, i)
269 pimpleControls_[i].storePrevIterFields();
#define forAll(list, i)
Loop across all elements in list.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Class to control time during OpenFOAM simulations that is also the top-level objectRegistry.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void clear()
Delete object (if the pointer is valid) and set pointer to.
Convergence control class. Provides methods to check the convergence of the time loop against an abso...
Corrector convergence control class. Provides methods to check the convergence of an inner iteration ...
T lookupOrDefault(const word &, const T &) const
Find and return a T, if not found return the given default.
Multi-region-specific derivation of the solution control class.
virtual const dictionary & dict() const
Return the solution dictionary.
Pimple loop class. Implements the logic which controls the pimple loop generically for a given correc...
bool loop(correctorConvergenceControl &convergence)
Pimple loop.
label nCorr_
Maximum number of correctors.
virtual bool read()
Read controls.
Pimple multi-region control class. As Foam::pimpleControl, but for a multi- region simulation compris...
virtual ~pimpleMultiRegionControl()
Destructor.
bool correctEnergy()
Energy corrector loop.
virtual convergenceData criteriaSatisfied() const
Return true if all convergence checks are satisfied.
pimpleMultiRegionControl(const Time &runTime, PtrList< solver > &solvers, const word &algorithmName="PIMPLE")
Construct from time and the list of solvers.
virtual bool hasResidualControls() const
Return true if residual controls are present.
virtual bool hasCorrResidualControls() const
Return true if corrector residual controls are present.
bool run(Time &time)
Time run loop.
virtual void resetCorrSolveIndex()
Reset the solve index in the correction residual control data.
virtual void updateCorrSolveIndex()
Update the solve index in the correction residual control data.
pimpleNoLoopControl & pimple(const label i)
Access the i-th pimple control.
virtual bool corrCriteriaSatisfied() const
Return true if all correction convergence checks are satisfied.
virtual bool read()
Read controls.
Enables the printing of a dictionary and subsequently looked-up defaulted entries.
const word & algorithmName() const
Return the name of the algorithm.
virtual bool read()=0
Read controls.
A class for handling words, derived from string.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Ostream & endl(Ostream &os)
Add newline and flush stream.
defineTypeNameAndDebug(atmosphericBoundaryLayer, 0)
Convergence data structure.