From 35c7838f3ed3b053ca9af4800597971dd391c2fd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <foss@grueninger.de>
Date: Tue, 2 Jan 2018 01:16:15 +0100
Subject: [PATCH] [mpfa] Compatibility code for GeometryTypes

---
 dumux/discretization/cellcentered/mpfa/helper.hh | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/dumux/discretization/cellcentered/mpfa/helper.hh b/dumux/discretization/cellcentered/mpfa/helper.hh
index 2f19812565..9532272f50 100644
--- a/dumux/discretization/cellcentered/mpfa/helper.hh
+++ b/dumux/discretization/cellcentered/mpfa/helper.hh
@@ -533,6 +533,16 @@ public:
      */
     static std::size_t getNumLocalScvfs(const Dune::GeometryType gt)
     {
+#if DUNE_VERSION_NEWER(DUNE_COMMON,2,6)
+        if (gt == Dune::GeometryTypes::tetrahedron)
+            return 12;
+        else if (gt == Dune::GeometryTypes::pyramid)
+            return 16;
+        else if (gt == Dune::GeometryTypes::prism)
+            return 18;
+        else if (gt == Dune::GeometryTypes::hexahedron)
+            return 24;
+#else
         if (gt == Dune::GeometryType(Dune::GeometryType::simplex, 3))
             return 12;
         else if (gt == Dune::GeometryType(Dune::GeometryType::pyramid, 3))
@@ -541,6 +551,7 @@ public:
             return 18;
         else if (gt == Dune::GeometryType(Dune::GeometryType::cube, 3))
             return 24;
+#endif
         else
             DUNE_THROW(Dune::NotImplemented, "Mpfa for 3d geometry type " << gt);
     }
-- 
GitLab