From bb0164f39f2979549dbac75b66622a24ed71260b Mon Sep 17 00:00:00 2001 From: Liu Ming Date: Mon, 11 Jul 2016 11:47:29 +0800 Subject: [PATCH] fix well iterations counting bugs. --- opm/autodiff/NonlinearSolver_impl.hpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/opm/autodiff/NonlinearSolver_impl.hpp b/opm/autodiff/NonlinearSolver_impl.hpp index 00a34e3cb..f08113311 100644 --- a/opm/autodiff/NonlinearSolver_impl.hpp +++ b/opm/autodiff/NonlinearSolver_impl.hpp @@ -137,7 +137,11 @@ namespace Opm } converged = report.converged; linIters += report.linear_iterations; - wellIters += report.well_iterations; + if (report.well_iterations != std::numeric_limits::min()) { + wellIters += report.well_iterations; + } else { + wellIters = report.well_iterations; + } ++iteration; } while ( (!converged && (iteration <= maxIter())) || (iteration <= minIter()));