mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-11-25 02:30:18 -06:00
giving more information when umfpack is not available.
when calling invDXDirect.
This commit is contained in:
parent
53942053af
commit
790db957f5
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -494,11 +494,7 @@ namespace Opm
|
||||
duneB_.mv(x, Bx);
|
||||
|
||||
// invDBx = duneD^-1 * Bx_
|
||||
#if HAVE_UMFPACK
|
||||
const BVectorWell invDBx = mswellhelpers::invDXDirect(duneD_, Bx);
|
||||
#else
|
||||
const BVectorWell invDBx = mswellhelpers::invDX(duneD_, Bx);
|
||||
#endif
|
||||
|
||||
// Ax = Ax - duneC_^T * invDBx
|
||||
duneC_.mmtv(invDBx,Ax);
|
||||
@ -514,11 +510,7 @@ namespace Opm
|
||||
apply(BVector& r) const
|
||||
{
|
||||
// invDrw_ = duneD^-1 * resWell_
|
||||
#if HAVE_UMFPACK
|
||||
const BVectorWell invDrw = mswellhelpers::invDXDirect(duneD_, resWell_);
|
||||
#else
|
||||
const BVectorWell invDrw = mswellhelpers::invDX(duneD_, resWell_);
|
||||
#endif // HAVE_UMFPACK
|
||||
// r = r - duneC_^T * invDrw
|
||||
duneC_.mmtv(invDrw, r);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user