Merge pull request #2666 from atgeirr/msw-log-output-cleanup

Prettifying and reducing log output from MSW.
This commit is contained in:
Kai Bao 2020-06-10 19:44:01 +02:00 committed by GitHub
commit 23a9f4732b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2440,14 +2440,16 @@ namespace Opm
// TODO: we should decide whether to keep the updated well_state, or recover to use the old well_state
if (converged) {
std::ostringstream sstr;
sstr << " well " << name() << " manage to get converged within " << it << " inner iterations \n";
sstr << " Well " << name() << " converged in " << it << " inner iterations.";
if (relax_convergence)
sstr << "A relaxed tolerance is used after "<< param_.strict_inner_iter_ms_wells_ << " iterations";
sstr << " (A relaxed tolerance was used after "<< param_.strict_inner_iter_ms_wells_ << " iterations)";
deferred_logger.debug(sstr.str());
} else {
std::ostringstream sstr;
sstr << " well " << name() << " did not get converged within " << it << " inner iterations \n";
sstr << " outputting the residual history for well " << name() << " during inner iterations \n";
sstr << " Well " << name() << " did not converge in " << it << " inner iterations.";
#define EXTRA_DEBUG_MSW 0
#if EXTRA_DEBUG_MSW
sstr << "***** Outputting the residual history for well " << name() << " during inner iterations:";
for (int i = 0; i < it; ++i) {
const auto& residual = residual_history[i];
sstr << " residual at " << i << "th iteration ";
@ -2456,6 +2458,7 @@ namespace Opm
}
sstr << " " << measure_history[i] << " \n";
}
#endif
deferred_logger.debug(sstr.str());
}
}