mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Throw if elliptic solve fails.
This commit is contained in:
parent
687465d591
commit
d8a7165ccb
@ -37,6 +37,7 @@
|
|||||||
|
|
||||||
#include "reenable_warning_pragmas.h"
|
#include "reenable_warning_pragmas.h"
|
||||||
|
|
||||||
|
#include <opm/core/utility/ErrorMacros.hpp>
|
||||||
|
|
||||||
namespace Opm
|
namespace Opm
|
||||||
{
|
{
|
||||||
@ -161,8 +162,8 @@ namespace Opm
|
|||||||
// Solve system.
|
// Solve system.
|
||||||
Dune::InverseOperatorResult result;
|
Dune::InverseOperatorResult result;
|
||||||
linsolve.apply(x, de, result);
|
linsolve.apply(x, de, result);
|
||||||
if (result.converged) {
|
if (!result.converged) {
|
||||||
// std::cout << "solveElliptic() successful!" << std::endl;
|
OPM_THROW(std::runtime_error, "CPRPreconditioner failed to solve elliptic subsystem.");
|
||||||
}
|
}
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user