From 8e800f0c93b644615a856e7392a85e45e516a27b Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn Date: Wed, 27 Nov 2019 15:40:17 +0100 Subject: [PATCH 1/2] [bugfix][BlackoilAmg] Fix compilation error when using DUNE 2.7 --- opm/simulators/linalg/BlackoilAmg.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/opm/simulators/linalg/BlackoilAmg.hpp b/opm/simulators/linalg/BlackoilAmg.hpp index 7a8802dae..c0fe84ad8 100644 --- a/opm/simulators/linalg/BlackoilAmg.hpp +++ b/opm/simulators/linalg/BlackoilAmg.hpp @@ -35,6 +35,7 @@ #include #include #include +#include namespace Dune { namespace Amg @@ -227,9 +228,14 @@ struct ScalarType > ComposeScalarTypeForSeqPrecond(Dune::SeqJac); ComposeScalarTypeForSeqPrecond(Dune::SeqSOR); ComposeScalarTypeForSeqPrecond(Dune::SeqSSOR); +#if DUNE_VERSION_NEWER(DUNE_ISTL, 2, 7) +ComposeScalarTypeForSeqPrecond(Dune::SeqILU); +#else +// Dune::SeqGS and Dune::SeqSOR are the same in DUNE 2.7 ComposeScalarTypeForSeqPrecond(Dune::SeqGS); ComposeScalarTypeForSeqPrecond(Dune::SeqILU0); ComposeScalarTypeForSeqPrecond(Dune::SeqILUn); +#endif #undef ComposeScalarTypeForSeqPrecond From 8b090301398ee55bac93b5da6778c55a339d7a58 Mon Sep 17 00:00:00 2001 From: Robert Kloefkorn Date: Thu, 28 Nov 2019 13:48:06 +0100 Subject: [PATCH 2/2] [bugfix] Make compatibility code compile with DUNE 2.7 --- ebos/femcpgridcompat.hh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ebos/femcpgridcompat.hh b/ebos/femcpgridcompat.hh index afe6078af..a4c3100db 100644 --- a/ebos/femcpgridcompat.hh +++ b/ebos/femcpgridcompat.hh @@ -46,13 +46,6 @@ template class EntityPointer; } -#if DUNE_VERSION_NEWER(DUNE_FEM, 2, 6) -template -auto referenceElement(const Dune::cpgrid::Geometry& geo) - -> decltype(referenceElement(geo.type())) -{ return referenceElement(geo.type()); } -#endif - // specialization of dune-fem compatiblity functions for CpGrid, since CpGrid does not use the interface classes. namespace Fem { @@ -61,6 +54,7 @@ namespace Fem { // make_entity for CpGrid entities // //////////////////////////////////////////////////////////// +#if ! DUNE_VERSION_NEWER(DUNE_GRID, 2, 6) template inline Dune::cpgrid::Entity make_entity(const Dune::cpgrid::EntityPointer& entityPointer) { return *entityPointer; } @@ -68,6 +62,7 @@ inline Dune::cpgrid::Entity make_entity(const Dune::cpgrid::EntityPointer template inline Dune::cpgrid::Entity make_entity(Dune::cpgrid::Entity entity) { return std::move(entity); } +#endif //////////////////////////////////////////////////////////// //