Use to_string() for WellFailure.

New functionality added is local well failure logging for NLDD.
This commit is contained in:
Atgeirr Flø Rasmussen 2024-01-23 11:23:14 +01:00
parent 04492413ff
commit 9102b2a352
2 changed files with 8 additions and 7 deletions

View File

@ -840,6 +840,13 @@ private:
if (mb_sum < acceptable_local_mb_sum && cnv_sum < acceptable_local_cnv_sum) { if (mb_sum < acceptable_local_mb_sum && cnv_sum < acceptable_local_cnv_sum) {
local_report.converged = true; local_report.converged = true;
logger.debug(fmt::format("Accepting solution in unconverged domain {} on rank {}.", domain.index, rank_)); logger.debug(fmt::format("Accepting solution in unconverged domain {} on rank {}.", domain.index, rank_));
} else {
logger.debug("Unconverged local solution.");
}
} else {
logger.debug("Unconverged local solution with well convergence failures:");
for (const auto& wf : convrep.wellFailures()) {
logger.debug(to_string(wf));
} }
} }
} }

View File

@ -122,13 +122,7 @@ namespace {
<< (report.wellFailed() ? "FAIL" : "CONV"); << (report.wellFailed() ? "FAIL" : "CONV");
if (report.wellFailed()) { if (report.wellFailed()) {
for (const auto& wf : report.wellFailures()) { for (const auto& wf : report.wellFailures()) {
os << " { " os << " " << to_string(wf);
<< wf.wellName() << ' ' << to_string(wf.type());
if (wf.type() == Opm::ConvergenceReport::WellFailure::Type::MassBalance) {
os << " Severity=" << to_string(wf.severity())
<< " Phase=" << wf.phase();
}
os << " }";
} }
} }
os << '\n'; os << '\n';