diff --git a/opm/autodiff/ISTLSolver.hpp b/opm/autodiff/ISTLSolver.hpp index 591ecd231..5810dc51b 100644 --- a/opm/autodiff/ISTLSolver.hpp +++ b/opm/autodiff/ISTLSolver.hpp @@ -122,6 +122,50 @@ struct MatrixDimension< MatrixBlock< Scalar, n, m > > { }; + +#if HAVE_UMFPACK + +/// \brief UMFPack specialization for MatrixBlock to make AMG happy +/// +/// Without this the empty default implementation would be used. +template +class UMFPack, A> > + : public UMFPack, A> > +{ + typedef UMFPack, A> > Base; + typedef BCRSMatrix, A> Matrix; + +public: + typedef BCRSMatrix, A> RealMatrix; + + UMFPack(const RealMatrix& matrix, int verbose, bool) + : Base(reinterpret_cast(matrix), verbose) + {} +}; +#endif + +#if HAVE_SUPERLU + +/// \brief SuperLU specialization for MatrixBlock to make AMG happy +/// +/// Without this the empty default implementation would be used. +template +class SuperLU, A> > + : public SuperLU, A> > +{ + typedef SuperLU, A> > Base; + typedef BCRSMatrix, A> Matrix; + +public: + typedef BCRSMatrix, A> RealMatrix; + + SuperLU(const RealMatrix& matrix, int verbose, bool reuse=true) + : Base(reinterpret_cast(matrix), verbose, reuse) + {} +}; +#endif + + } // end namespace Dune namespace Opm