mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
pimpleLoop: Fixed bug when convergence occurs on last iteration
Resolves bug report https://bugs.openfoam.org/view.php?id=2940
This commit is contained in:
@ -71,6 +71,18 @@ bool Foam::pimpleLoop::loop(correctorConvergenceControl& convergence)
|
||||
|
||||
// Handle quit conditions first
|
||||
{
|
||||
// If converged on the last iteration then end the correction loop
|
||||
if (converged_)
|
||||
{
|
||||
Info<< control_.algorithmName() << ": Converged in "
|
||||
<< corrPimple_ - 1 << " iterations" << endl;
|
||||
|
||||
corrPimple_ = 0;
|
||||
converged_ = false;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// If all corrections have been completed then end the correction loop
|
||||
if (corrPimple_ > nCorrPimple_)
|
||||
{
|
||||
@ -80,17 +92,6 @@ bool Foam::pimpleLoop::loop(correctorConvergenceControl& convergence)
|
||||
<< nCorrPimple_ << " iterations" << endl;
|
||||
}
|
||||
|
||||
corrPimple_ = 0;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
// If converged on the last iteration then end the correction loop
|
||||
if (converged_)
|
||||
{
|
||||
Info<< control_.algorithmName() << ": Converged in "
|
||||
<< corrPimple_ - 1 << " iterations" << endl;
|
||||
|
||||
corrPimple_ = 0;
|
||||
converged_ = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user