mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Make sure that the convergece report is stored before throw
This commit is contained in:
parent
cda7d1906e
commit
8a4117441c
@ -795,14 +795,6 @@ namespace Opm {
|
||||
auto report = getReservoirConvergence(timer.currentStepLength(), iteration, B_avg, residual_norms);
|
||||
report += wellModel().getWellConvergence(B_avg);
|
||||
|
||||
// Throw if any NaN or too large residual found.
|
||||
ConvergenceReport::Severity severity = report.severityOfWorstFailure();
|
||||
if (severity == ConvergenceReport::Severity::NotANumber) {
|
||||
OPM_THROW(Opm::NumericalIssue, "NaN residual found!");
|
||||
} else if (severity == ConvergenceReport::Severity::TooLarge) {
|
||||
OPM_THROW(Opm::NumericalIssue, "Too large residual found!");
|
||||
}
|
||||
|
||||
return report;
|
||||
}
|
||||
|
||||
|
@ -491,6 +491,7 @@ namespace Opm {
|
||||
std::ostringstream msg;
|
||||
msg << " Excessive chopping detected in report step "
|
||||
<< sr.back().report_step << ", substep " << sr.back().current_step << "\n";
|
||||
assert(!sr.back().report.empty());
|
||||
const auto& wfs = sr.back().report.back().wellFailures();
|
||||
for (const auto& wf : wfs) {
|
||||
msg << " Well that failed: " << wf.wellName() << "\n";
|
||||
|
Loading…
Reference in New Issue
Block a user