diff --git a/opm/models/parallel/gridcommhandles.hh b/opm/models/parallel/gridcommhandles.hh index 817e21e05..16ba0cc36 100644 --- a/opm/models/parallel/gridcommhandles.hh +++ b/opm/models/parallel/gridcommhandles.hh @@ -58,7 +58,11 @@ public: return codim == commCodim; } +#if DUNE_VERSION_LT(DUNE_GRID, 2, 8) bool fixedsize(int, int) const +#else + bool fixedSize(int, int) const +#endif { // for each DOF we communicate a single value which has a // fixed size @@ -118,7 +122,11 @@ public: return codim == commCodim; } +#if DUNE_VERSION_LT(DUNE_GRID, 2, 8) bool fixedsize(int, int) const +#else + bool fixedSize(int, int) const +#endif { // for each DOF we communicate a single value which has a // fixed size @@ -173,7 +181,11 @@ public: return codim == commCodim; } +#if DUNE_VERSION_LT(DUNE_GRID, 2, 8) bool fixedsize(int, int) const +#else + bool fixedSize(int, int) const +#endif { // for each DOF we communicate a single value which has a // fixed size @@ -230,7 +242,11 @@ public: return codim == commCodim; } +#if DUNE_VERSION_LT(DUNE_GRID, 2, 8) bool fixedsize(int, int) const +#else + bool fixedSize(int, int) const +#endif { // for each DOF we communicate a single value which has a // fixed size diff --git a/opm/simulators/linalg/elementborderlistfromgrid.hh b/opm/simulators/linalg/elementborderlistfromgrid.hh index 69875230f..dabe6b200 100644 --- a/opm/simulators/linalg/elementborderlistfromgrid.hh +++ b/opm/simulators/linalg/elementborderlistfromgrid.hh @@ -84,7 +84,11 @@ class ElementBorderListFromGrid bool contains(int, int codim) const { return codim == 0; } +#if DUNE_VERSION_LT(DUNE_GRID, 2, 8) bool fixedsize(int, int) const +#else + bool fixedSize(int, int) const +#endif { return true; } template @@ -174,7 +178,11 @@ class ElementBorderListFromGrid bool contains(int, int codim) const { return codim == 0; } +#if DUNE_VERSION_LT(DUNE_GRID, 2, 8) bool fixedsize(int, int) const +#else + bool fixedSize(int, int) const +#endif { return true; } template diff --git a/opm/simulators/linalg/ilufirstelement.hh b/opm/simulators/linalg/ilufirstelement.hh new file mode 100644 index 000000000..f343ca89a --- /dev/null +++ b/opm/simulators/linalg/ilufirstelement.hh @@ -0,0 +1,41 @@ +// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- +// vi: set et ts=4 sw=4 sts=4: +/* + This file is part of the Open Porous Media project (OPM). + + OPM is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + OPM is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with OPM. If not, see . + + Consult the COPYING file in the top-level source directory of this + module for the precise wording of the license and the list of + copyright holders. +*/ + +#ifndef EWOMS_ILU_FIRSTELEMENT_HH +#define EWOMS_ILU_FIRSTELEMENT_HH +#include +#include + +namespace Opm +{ +template +#if DUNE_VERSION_GTE(DUNE_GRID, 2, 8) +K& firstMatrixElement(MatrixBlock& A) +#else +K& firstmatrixelement(MatrixBlock& A) +#endif +{ return A[0][0]; } +} +#endif // EWOMS_ILU_FIRSTELEMENT_HH + + diff --git a/opm/simulators/linalg/istlpreconditionerwrappers.hh b/opm/simulators/linalg/istlpreconditionerwrappers.hh index 7467c9d26..1404066fb 100644 --- a/opm/simulators/linalg/istlpreconditionerwrappers.hh +++ b/opm/simulators/linalg/istlpreconditionerwrappers.hh @@ -47,7 +47,7 @@ #include #include #include - +#include //definitions needed in next header #include #include diff --git a/opm/simulators/linalg/matrixblock.hh b/opm/simulators/linalg/matrixblock.hh index 7cdf8eb68..1f95bf851 100644 --- a/opm/simulators/linalg/matrixblock.hh +++ b/opm/simulators/linalg/matrixblock.hh @@ -25,12 +25,14 @@ #include #include -#include #include #include -#include +#include +#include + #include +#include namespace Opm { namespace MatrixBlockHelp { @@ -247,10 +249,6 @@ void print_row(std::ostream& s, const Opm::MatrixBlock& A, int precision) { print_row(s, A.asBase(), I, J, therow, width, precision); } -template -K& firstmatrixelement(Opm::MatrixBlock& A) -{ return firstmatrixelement(A.asBase()); } - template struct MatrixDimension > : public MatrixDimension::BaseType> @@ -297,6 +295,11 @@ public: }; #endif +template +struct IsNumber> + : public IsNumber> +{}; + } // end namespace Dune diff --git a/opm/simulators/linalg/overlappingbcrsmatrix.hh b/opm/simulators/linalg/overlappingbcrsmatrix.hh index 75dfafa55..d6f32fc33 100644 --- a/opm/simulators/linalg/overlappingbcrsmatrix.hh +++ b/opm/simulators/linalg/overlappingbcrsmatrix.hh @@ -36,7 +36,6 @@ #include #include - #include #include #include diff --git a/opm/simulators/linalg/overlappingpreconditioner.hh b/opm/simulators/linalg/overlappingpreconditioner.hh index c41995ee3..9b07cf18d 100644 --- a/opm/simulators/linalg/overlappingpreconditioner.hh +++ b/opm/simulators/linalg/overlappingpreconditioner.hh @@ -30,8 +30,8 @@ #include "overlappingscalarproduct.hh" #include - -#include +#include //definitions needed in next header +#include #include diff --git a/opm/simulators/linalg/vertexborderlistfromgrid.hh b/opm/simulators/linalg/vertexborderlistfromgrid.hh index 4876455a9..8413d1cc8 100644 --- a/opm/simulators/linalg/vertexborderlistfromgrid.hh +++ b/opm/simulators/linalg/vertexborderlistfromgrid.hh @@ -83,7 +83,11 @@ public: bool contains(int dim, int codim) const { return dim == codim; } +#if DUNE_VERSION_LT(DUNE_GRID, 2, 8) bool fixedsize(int, int) const +#else + bool fixedSize(int, int) const +#endif { return true; } template