mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -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.
|
// Throw if any NaN or too large residual found.
|
||||||
if (severity == ConvergenceReport::Severity::NotANumber) {
|
if (severity == ConvergenceReport::Severity::NotANumber) {
|
||||||
|
failureReport_ += report;
|
||||||
OPM_THROW_PROBLEM(NumericalProblem, "NaN residual found!");
|
OPM_THROW_PROBLEM(NumericalProblem, "NaN residual found!");
|
||||||
} else if (severity == ConvergenceReport::Severity::TooLarge) {
|
} else if (severity == ConvergenceReport::Severity::TooLarge) {
|
||||||
|
failureReport_ += report;
|
||||||
OPM_THROW_NOLOG(NumericalProblem, "Too large residual found!");
|
OPM_THROW_NOLOG(NumericalProblem, "Too large residual found!");
|
||||||
} else if (severity == ConvergenceReport::Severity::ConvergenceMonitorFailure) {
|
} 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_));
|
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) {
|
catch (const ConvergenceMonitorFailure& e) {
|
||||||
causeOfFailure = "Convergence monitor failure";
|
causeOfFailure = "Convergence monitor failure";
|
||||||
|
substepReport = solver.failureReport();
|
||||||
}
|
}
|
||||||
catch (const LinearSolverProblem& e) {
|
catch (const LinearSolverProblem& e) {
|
||||||
substepReport = solver.failureReport();
|
substepReport = solver.failureReport();
|
||||||
|
Loading…
Reference in New Issue
Block a user