Removed unused method invDXDirect.

This commit is contained in:
Markus Blatt 2020-08-18 17:52:51 +02:00
parent 7261759065
commit e96c4a9908

View File

@ -38,12 +38,12 @@ namespace Opm {
namespace mswellhelpers namespace mswellhelpers
{ {
#if HAVE_UMFPACK
/// Applies umfpack and checks for singularity /// Applies umfpack and checks for singularity
template <typename MatrixType, typename VectorType> template <typename MatrixType, typename VectorType>
VectorType VectorType
applyUMFPack(const MatrixType& D, std::shared_ptr<Dune::UMFPack<MatrixType> >& linsolver, VectorType x) applyUMFPack(const MatrixType& D, std::shared_ptr<Dune::UMFPack<MatrixType> >& linsolver, VectorType x)
{ {
#if HAVE_UMFPACK
if (!linsolver) if (!linsolver)
{ {
linsolver.reset(new Dune::UMFPack<MatrixType>(D, 0)); linsolver.reset(new Dune::UMFPack<MatrixType>(D, 0));
@ -69,28 +69,15 @@ namespace mswellhelpers
} }
} }
return y; return y;
}
#endif
// obtain y = D^-1 * x with a direct solver
template <typename MatrixType, typename VectorType>
VectorType
invDXDirect(const MatrixType& D, VectorType x)
{
#if HAVE_UMFPACK
std::shared_ptr<Dune::UMFPack<MatrixType> > linsolver;
return applyUMFPack(D, linsolver, x);
#else #else
// this is not thread safe // this is not thread safe
OPM_THROW(std::runtime_error, "Cannot use invDXDirect() without UMFPACK. " OPM_THROW(std::runtime_error, "Cannot use aplyUMFPack() without UMFPACK. "
"Reconfigure opm-simulator with SuiteSparse/UMFPACK support and recompile."); "Reconfigure opm-simulator with SuiteSparse/UMFPACK support and recompile.");
#endif // HAVE_UMFPACK #endif // HAVE_UMFPACK
} }
// obtain y = D^-1 * x with a BICSSTAB iterative solver // obtain y = D^-1 * x with a BICSSTAB iterative solver
template <typename MatrixType, typename VectorType> template <typename MatrixType, typename VectorType>
VectorType VectorType