diff --git a/opm/autodiff/StandardWellsDense_impl.hpp b/opm/autodiff/StandardWellsDense_impl.hpp index 84d47d00d..99e3e0431 100644 --- a/opm/autodiff/StandardWellsDense_impl.hpp +++ b/opm/autodiff/StandardWellsDense_impl.hpp @@ -451,9 +451,13 @@ namespace Opm { } while (it < 15); if (converged) { - OpmLog::debug("Well equation solution gets converged with " + std::to_string(it) + " iterations"); + if ( terminal_output_ ) { + OpmLog::debug("Well equation solution gets converged with " + std::to_string(it) + " iterations"); + } } else { - OpmLog::debug("Well equation solution failed in getting converged with " + std::to_string(it) + " iterations"); + if ( terminal_output_ ) { + OpmLog::debug("Well equation solution failed in getting converged with " + std::to_string(it) + " iterations"); + } well_state = well_state0; updatePrimaryVariables(well_state); @@ -496,7 +500,9 @@ namespace Opm { if (nan_residual_found) { for (const auto& well : report.nan_residual_wells) { - OpmLog::debug("NaN residual found with phase " + well.phase_name + " for well " + well.well_name); + if ( terminal_output_ ) { + OpmLog::debug("NaN residual found with phase " + well.phase_name + " for well " + well.well_name); + } } OPM_THROW(Opm::NumericalProblem, "NaN residual found!"); } @@ -511,7 +517,9 @@ namespace Opm { too_large_residual_found = grid.comm().max(value); if (too_large_residual_found) { for (const auto& well : report.too_large_residual_wells) { - OpmLog::debug("Too large residual found with phase " + well.phase_name + " fow well " + well.well_name); + if ( terminal_output_ ) { + OpmLog::debug("Too large residual found with phase " + well.phase_name + " fow well " + well.well_name); + } } OPM_THROW(Opm::NumericalProblem, "Too large residual found!"); }