diff --git a/opm/autodiff/DuneMatrix.hpp b/opm/autodiff/DuneMatrix.hpp index 821a5b943..d603c1596 100644 --- a/opm/autodiff/DuneMatrix.hpp +++ b/opm/autodiff/DuneMatrix.hpp @@ -27,6 +27,8 @@ #include #include +#include + // Include matrix header with hackery to make it possible to inherit. #define private protected #include @@ -52,9 +54,12 @@ namespace Opm this->n = rows; this->m = cols; this->nnz = ia[rows]; + +#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 3) this->allocationSize = this->nnz; this->avg = 0; this->overflowsize = -1.0; +#endif this->a = new B[this->nnz]; static_assert(sizeof(B) == sizeof(double), "This constructor requires a block type that is the same as a double.");