Throw if elliptic solve fails.

This commit is contained in:
Atgeirr Flø Rasmussen 2014-08-14 14:19:55 +02:00
parent 687465d591
commit d8a7165ccb

View File

@ -37,6 +37,7 @@
#include "reenable_warning_pragmas.h"
#include <opm/core/utility/ErrorMacros.hpp>
namespace Opm
{
@ -161,8 +162,8 @@ namespace Opm
// Solve system.
Dune::InverseOperatorResult result;
linsolve.apply(x, de, result);
if (result.converged) {
// std::cout << "solveElliptic() successful!" << std::endl;
if (!result.converged) {
OPM_THROW(std::runtime_error, "CPRPreconditioner failed to solve elliptic subsystem.");
}
return x;
}