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()));