ENH: PBiCG, PBiCGStab, PCG: Changed maxIter test to pre-increment counter

Resolves bug-report https://bugs.openfoam.org/view.php?id=2716
This commit is contained in:
Henry Weller
2017-10-09 12:23:28 +01:00
committed by Andrew Heather
parent c487fe2ff0
commit 0f45c29feb
3 changed files with 4 additions and 4 deletions

View File

@ -201,7 +201,7 @@ Foam::solverPerformance Foam::PBiCG::solve
} while
(
(
solverPerf.nIterations()++ < maxIter_
++solverPerf.nIterations() < maxIter_
&& !solverPerf.checkConvergence(tolerance_, relTol_)
)
|| solverPerf.nIterations() < minIter_

View File

@ -241,7 +241,7 @@ Foam::solverPerformance Foam::PBiCGStab::solve
} while
(
(
solverPerf.nIterations()++ < maxIter_
++solverPerf.nIterations() < maxIter_
&& !solverPerf.checkConvergence(tolerance_, relTol_)
)
|| solverPerf.nIterations() < minIter_

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -182,7 +182,7 @@ Foam::solverPerformance Foam::PCG::solve
} while
(
(
solverPerf.nIterations()++ < maxIter_
++solverPerf.nIterations() < maxIter_
&& !solverPerf.checkConvergence(tolerance_, relTol_)
)
|| solverPerf.nIterations() < minIter_