From 2e4d5ee57bc218541dc08053c073e16d06260e83 Mon Sep 17 00:00:00 2001 From: hnil Date: Wed, 29 Mar 2023 09:47:02 +0200 Subject: [PATCH] - Remove wrong output if already converged --- opm/simulators/linalg/ISTLSolverEbos.hpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/opm/simulators/linalg/ISTLSolverEbos.hpp b/opm/simulators/linalg/ISTLSolverEbos.hpp index 13c6df225..a91464dae 100644 --- a/opm/simulators/linalg/ISTLSolverEbos.hpp +++ b/opm/simulators/linalg/ISTLSolverEbos.hpp @@ -434,13 +434,15 @@ std::unique_ptr blockJacobiAdjacency(const Grid& grid, // store number of iterations iterations_ = result.iterations; converged_ = result.converged; - if(result.reduction < parameters_.relaxed_linear_solver_reduction_){ - std::stringstream ss; - ss<< "Full linear solver tolerance not achived. The reduction is:" << result.reduction - << " after " << result.iterations << " iterations "; - OpmLog::warning(ss.str()); - converged_ = true; - } + if(!converged_){ + if(result.reduction < parameters_.relaxed_linear_solver_reduction_){ + std::stringstream ss; + ss<< "Full linear solver tolerance not achived. The reduction is:" << result.reduction + << " after " << result.iterations << " iterations "; + OpmLog::warning(ss.str()); + converged_ = true; + } + } // Check for failure of linear solver. if (!parameters_.ignoreConvergenceFailure_ && !converged_) { const std::string msg("Convergence failure for linear solver.");