diff --git a/opm/simulators/linalg/bda/MultisegmentWellContribution.hpp b/opm/simulators/linalg/bda/MultisegmentWellContribution.hpp index 403ae93fd..6b9e8fd67 100644 --- a/opm/simulators/linalg/bda/MultisegmentWellContribution.hpp +++ b/opm/simulators/linalg/bda/MultisegmentWellContribution.hpp @@ -26,7 +26,9 @@ #include #endif -#include +#if HAVE_SUITESPARSE_UMFPACK +#include +#endif #include namespace Opm @@ -79,8 +81,7 @@ private: public: #if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) - using UMFPackIndex = - typename Dune::UMFPack>>::UMFPackMatrix::Index; + using UMFPackIndex = SuiteSparse_long; #else using UMFPackIndex = int; #endif diff --git a/opm/simulators/linalg/bda/WellContributions.hpp b/opm/simulators/linalg/bda/WellContributions.hpp index eed9e35ea..ac001e01b 100644 --- a/opm/simulators/linalg/bda/WellContributions.hpp +++ b/opm/simulators/linalg/bda/WellContributions.hpp @@ -31,7 +31,9 @@ #include #include -#include +#if HAVE_SUITESPARSE_UMFPACK +#include +#endif #include namespace Opm @@ -58,8 +60,7 @@ class WellContributions { public: #if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) - using UMFPackIndex = - typename Dune::UMFPack>>::UMFPackMatrix::Index; + using UMFPackIndex = SuiteSparse_long; #else using UMFPackIndex = int; #endif