From e256be267cc5147a12f8e4ca6a5d30674f245890 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atgeirr=20Fl=C3=B8=20Rasmussen?= Date: Tue, 30 Sep 2014 09:57:45 +0200 Subject: [PATCH] Compile fix for Dune 2.2. Some BCRSMatrix members are new in 2.3. --- opm/autodiff/DuneMatrix.hpp | 5 +++++ 1 file changed, 5 insertions(+) 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.");