giving more information when umfpack is not available.

when calling invDXDirect.
This commit is contained in:
Kai Bao
2017-11-03 10:03:03 +01:00
parent 53942053af
commit 790db957f5
2 changed files with 5 additions and 10 deletions

View File

@@ -33,12 +33,12 @@ namespace Opm {
namespace mswellhelpers
{
#if HAVE_UMFPACK
// obtain y = D^-1 * x with a direct solver
template <typename MatrixType, typename VectorType>
VectorType
invDXDirect(const MatrixType& D, VectorType x)
{
#if HAVE_UMFPACK
VectorType y(x.size());
y = 0.;
@@ -61,8 +61,11 @@ namespace mswellhelpers
}
return y;
}
#else
OPM_THROW(std::runtime_error, "Cannot use invDXDirect() without UMFPACK. "
"Reconfigure opm-simulator with SuiteSparse/UMFPACK support and recompile.");
#endif // HAVE_UMFPACK
}