mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-16 15:44:49 -06:00
Ensure correct propagation of failed report
This commit is contained in:
parent
6d53daaa42
commit
71a64fbd13
@ -366,10 +366,13 @@ namespace Opm {
|
||||
|
||||
// Throw if any NaN or too large residual found.
|
||||
if (severity == ConvergenceReport::Severity::NotANumber) {
|
||||
failureReport_ += report;
|
||||
OPM_THROW_PROBLEM(NumericalProblem, "NaN residual found!");
|
||||
} else if (severity == ConvergenceReport::Severity::TooLarge) {
|
||||
failureReport_ += report;
|
||||
OPM_THROW_NOLOG(NumericalProblem, "Too large residual found!");
|
||||
} else if (severity == ConvergenceReport::Severity::ConvergenceMonitorFailure) {
|
||||
failureReport_ += report;
|
||||
OPM_THROW_PROBLEM(ConvergenceMonitorFailure, "Total penalty count exceeded cut-off-limit of " + std::to_string(param_.convergence_monitoring_cutoff_));
|
||||
}
|
||||
}
|
||||
|
@ -249,6 +249,7 @@ void registerAdaptiveParameters();
|
||||
}
|
||||
catch (const ConvergenceMonitorFailure& e) {
|
||||
causeOfFailure = "Convergence monitor failure";
|
||||
substepReport = solver.failureReport();
|
||||
}
|
||||
catch (const LinearSolverProblem& e) {
|
||||
substepReport = solver.failureReport();
|
||||
|
Loading…
Reference in New Issue
Block a user