Commit 0f45c29f authored by Henry Weller's avatar Henry Weller Committed by Andrew Heather
Browse files

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

Resolves bug-report https://bugs.openfoam.org/view.php?id=2716
parent c487fe2f
......@@ -201,7 +201,7 @@ Foam::solverPerformance Foam::PBiCG::solve
} while
(
(
solverPerf.nIterations()++ < maxIter_
++solverPerf.nIterations() < maxIter_
&& !solverPerf.checkConvergence(tolerance_, relTol_)
)
|| solverPerf.nIterations() < minIter_
......
......@@ -241,7 +241,7 @@ Foam::solverPerformance Foam::PBiCGStab::solve
} while
(
(
solverPerf.nIterations()++ < maxIter_
++solverPerf.nIterations() < maxIter_
&& !solverPerf.checkConvergence(tolerance_, relTol_)
)
|| solverPerf.nIterations() < minIter_
......
......@@ -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_
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment