From 57895d574ec04a6017c821e4f4b8e1d45fe4fee9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?=
 <christoph.grueninger@iws.uni-stuttgart.de>
Date: Sun, 11 Oct 2015 23:57:56 +0200
Subject: [PATCH] [Cleanup] Remove Dune 2.3 compatibility code.

---
 .../fvmpfa/lmethod/fvmpfal2dpressure2p.hh     | 10 +---
 .../fvmpfal3dinteractionvolumecontainer.hh    | 37 -------------
 .../fvmpfa/lmethod/fvmpfal3dpressure2p.hh     |  8 ---
 .../2p/diffusion/mimetic/croperator2p.hh      | 22 +-------
 .../2p/diffusion/mimetic/mimetic2p.hh         | 20 -------
 .../2p/diffusion/mimetic/mimeticpressure2p.hh |  8 ---
 .../mimetic/mimeticpressure2padaptive.hh      |  8 ---
 .../2p/impes/gridadaptionindicator2p.hh       |  8 ---
 .../2p/impes/gridadaptionindicator2plocal.hh  |  8 ---
 .../gridadaptinitializationindicator.hh       | 10 +---
 dumux/decoupled/common/variableclass.hh       |  8 ---
 .../el1p2c/el1p2celementvolumevariables.hh    |  5 +-
 .../el1p2c/el1p2cvolumevariables.hh           |  4 --
 dumux/geomechanics/el2p/el2passembler.hh      |  5 +-
 dumux/geomechanics/el2p/el2pbasemodel.hh      | 32 ------------
 .../el2p/el2pelementvolumevariables.hh        |  8 ---
 dumux/geomechanics/el2p/el2plocaloperator.hh  |  9 +---
 dumux/implicit/2p/2pgridadaptindicator.hh     | 21 +-------
 dumux/implicit/2p2c/2p2cvolumevariables.hh    |  4 --
 dumux/implicit/2pnc/2pncvolumevariables.hh    |  4 --
 .../2pncmin/2pncminvolumevariables.hh         |  4 --
 dumux/implicit/3p3c/3p3cvolumevariables.hh    |  4 --
 dumux/implicit/adaptive/adaptionhelper.hh     |  8 ---
 .../gridadaptinitializationindicator.hh       |  9 +---
 dumux/implicit/box/boxassembler.hh            | 19 ++-----
 dumux/implicit/box/boxelementboundarytypes.hh |  4 --
 .../implicit/box/boxelementvolumevariables.hh |  8 ---
 dumux/implicit/box/intersectiontovertexbc.hh  |  9 +---
 dumux/implicit/common/implicitassembler.hh    |  8 ---
 .../implicit/common/implicitlocaljacobian.hh  |  4 --
 dumux/implicit/common/implicitmodel.hh        | 52 -------------------
 .../implicit/common/implicitvelocityoutput.hh | 13 +----
 .../mpnc/mpncvolumevariablesiakinetic.hh      | 10 +---
 dumux/io/artgridcreator.hh                    | 15 +-----
 dumux/io/plotoverline2d.hh                    |  5 +-
 dumux/io/vtknestedfunction.hh                 | 13 +----
 dumux/linear/amgparallelhelpers.hh            | 32 ------------
 dumux/linear/vectorexchange.hh                |  9 ----
 dumux/linear/vertexborderlistfromgrid.hh      |  8 ---
 .../2cstokes2p2c/2cstokes2p2clocaloperator.hh |  5 --
 dumux/parallel/vertexhandles.hh               | 25 ---------
 test/geomechanics/el2p/el2pproblem.hh         | 12 -----
 test/implicit/2pdfm/2pdfmspatialparams.hh     | 12 -----
 test/io/gridcreator/test_gridcreator_gmsh.cc  |  5 +-
 44 files changed, 23 insertions(+), 509 deletions(-)

diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh
index f8a7ac6c9f..23caf61c6d 100644
--- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh
+++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressure2p.hh
@@ -833,11 +833,8 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo()
 //
 //                int globalVertIdx12corner = problem_.variables().index(
 //                        *((*eIt).template subEntity < dim > (localVertIdx12corner)));
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int globalVertIdx12corner = problem_.variables().vertexMapper().subIndex(*eIt, localVertIdx12corner, dim);
-#else
-                int globalVertIdx12corner = problem_.variables().vertexMapper().map(*eIt, localVertIdx12corner, dim);
-#endif
+
 //                std::cout<<"globalVertIdx12corner = "<<globalVertIdx12corner<<"\n";
 
 
@@ -848,11 +845,8 @@ void FvMpfaL2dPressure2p<TypeTag>::storeInteractionVolumeInfo()
 
 //                    int globalVertIdx14corner = problem_.variables().index(
 //                            *((*eIt).template subEntity < dim > (localVertIdx14corner)));
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                     int globalVertIdx14corner = problem_.variables().vertexMapper().subIndex(*eIt, localVertIdx14corner, dim);
-#else
-                    int globalVertIdx14corner = problem_.variables().vertexMapper().map(*eIt, localVertIdx14corner, dim);
-#endif
+
 //                    std::cout<<"globalVertIdx14corner = "<<globalVertIdx14corner<<"\n";
 
                     if (globalVertIdx12corner == globalVertIdx14corner)
diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh
index 3437ed1aef..49299fc1f7 100644
--- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh
+++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dinteractionvolumecontainer.hh
@@ -320,7 +320,6 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeSubVolumeElements(const
                                                                           std::vector < std::vector<int> >& elemVertMap)
 {
     int eIdxGlobal = problem_.variables().index(element);
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
     int vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 0, dim);
     interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 7);
     elemVertMap[vIdxGlobal][7] = eIdxGlobal;
@@ -352,39 +351,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeSubVolumeElements(const
     vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, 7, dim);
     interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 0);
     elemVertMap[vIdxGlobal][0] = eIdxGlobal;
-#else
-    int vIdxGlobal = problem_.variables().vertexMapper().map(element, 0, dim);
-    interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 7);
-    elemVertMap[vIdxGlobal][7] = eIdxGlobal;
-
-    vIdxGlobal = problem_.variables().vertexMapper().map(element, 1, dim);
-    interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 6);
-    elemVertMap[vIdxGlobal][6] = eIdxGlobal;
-
-    vIdxGlobal = problem_.variables().vertexMapper().map(element, 2, dim);
-    interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 5);
-    elemVertMap[vIdxGlobal][5] = eIdxGlobal;
-
-    vIdxGlobal = problem_.variables().vertexMapper().map(element, 3, dim);
-    interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 4);
-    elemVertMap[vIdxGlobal][4] = eIdxGlobal;
-
-    vIdxGlobal = problem_.variables().vertexMapper().map(element, 4, dim);
-    interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 3);
-    elemVertMap[vIdxGlobal][3] = eIdxGlobal;
-
-    vIdxGlobal = problem_.variables().vertexMapper().map(element, 5, dim);
-    interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 2);
-    elemVertMap[vIdxGlobal][2] = eIdxGlobal;
-
-    vIdxGlobal = problem_.variables().vertexMapper().map(element, 6, dim);
-    interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 1);
-    elemVertMap[vIdxGlobal][1] = eIdxGlobal;
 
-    vIdxGlobal = problem_.variables().vertexMapper().map(element, 7, dim);
-    interactionVolumes_[vIdxGlobal].setSubVolumeElement(element, 0);
-    elemVertMap[vIdxGlobal][0] = eIdxGlobal;
-#endif
 }
 
 /*! \brief Stores information with respect to DUNE intersections in the interaction volumes
@@ -452,11 +419,7 @@ void FvMpfaL3dInteractionVolumeContainer<TypeTag>::storeIntersectionInfo(const E
             {
                 int localVertIdx = referenceElement.subEntity(indexInInside, 1, i, dim);
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int vIdxGlobal = problem_.variables().vertexMapper().subIndex(element, localVertIdx, dim);
-#else
-                int vIdxGlobal = problem_.variables().vertexMapper().map(element, localVertIdx, dim);
-#endif
 
                 InteractionVolume& interactionVolume = interactionVolumes_[vIdxGlobal];
 
diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh
index 203e5b23a3..7fb9da22c1 100644
--- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh
+++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal3dpressure2p.hh
@@ -568,11 +568,7 @@ void FvMpfaL3dPressure2p<TypeTag>::initializeMatrixRowSize()
 
         for (int vIdx = 0; vIdx < numVertices; vIdx++)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = problem_.variables().vertexMapper().subIndex(*eIt, vIdx, dim);
-#else
-            int vIdxGlobal = problem_.variables().vertexMapper().map(*eIt, vIdx, dim);
-#endif
 
             InteractionVolume& interactionVolume = interactionVolumes_.interactionVolume(vIdxGlobal);
 
@@ -612,11 +608,7 @@ void FvMpfaL3dPressure2p<TypeTag>::initializeMatrixIndices()
 
         for (int vIdx = 0; vIdx < numVertices; vIdx++)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = problem_.variables().vertexMapper().subIndex(*eIt, vIdx, dim);
-#else
-            int vIdxGlobal = problem_.variables().vertexMapper().map(*eIt, vIdx, dim);
-#endif
 
             InteractionVolume& interactionVolume = interactionVolumes_.interactionVolume(vIdxGlobal);
             for (int subVolumeIdx = 0; subVolumeIdx < InteractionVolume::subVolumeTotalNum; subVolumeIdx++)
diff --git a/dumux/decoupled/2p/diffusion/mimetic/croperator2p.hh b/dumux/decoupled/2p/diffusion/mimetic/croperator2p.hh
index f44d676d85..012a614a38 100644
--- a/dumux/decoupled/2p/diffusion/mimetic/croperator2p.hh
+++ b/dumux/decoupled/2p/diffusion/mimetic/croperator2p.hh
@@ -144,11 +144,7 @@ public:
 
             for (int i = 0; i < numFaces; i++)
             {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int index = faceMapper_.subIndex(*eIt, i,1);
-#else
-                int index = faceMapper_.map(*eIt, i,1);
-#endif
 
                 if (!visited[index])
                 {
@@ -179,11 +175,8 @@ public:
 
             for (int i = 0; i < numFaces; i++)
             {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int indexI = faceMapper_.subIndex(*eIt, i, 1);
-#else
-                int indexI = faceMapper_.map(*eIt, i, 1);
-#endif
+
                 if (!visited[indexI])
                 {
                     A_.addindex(indexI,indexI);
@@ -191,11 +184,8 @@ public:
                 }
                 for (int k = 0; k < numFaces; k++)
                     if (k != i) {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                         int indexJ = faceMapper_.subIndex(*eIt, k, 1);
-#else
-                        int indexJ = faceMapper_.map(*eIt, k, 1);
-#endif
+
                         A_.addindex(indexI, indexJ);
                         //std::cout << "indexI = " << indexI << ", added indexJ = " << indexJ << std::endl;
                     }
@@ -280,11 +270,7 @@ public:
             // get local to global id map
             for (unsigned int k = 0; k < numFaces; k++)
             {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int alpha = faceMapper_.subIndex(*eIt, k, 1);
-#else
-                int alpha = faceMapper_.map(*eIt, k, 1);
-#endif
                 local2Global[k] = alpha;
             }
 
@@ -325,11 +311,7 @@ public:
             // get local to global id map
             for (unsigned int k = 0; k < numFaces; k++)
             {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int alpha = faceMapper_.subIndex(*eIt, k, 1);
-#else
-                int alpha = faceMapper_.map(*eIt, k, 1);
-#endif
                 local2Global[k] = alpha;
             }
             loc.completeRHS(*eIt, local2Global, f);
diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh b/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh
index 4fc8b7277d..4c87e4af6b 100644
--- a/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh
+++ b/dumux/decoupled/2p/diffusion/mimetic/mimetic2p.hh
@@ -181,11 +181,7 @@ public:
      */
     void assemble(const Element& element, int k = 1)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         unsigned int numFaces = element.subEntities(1);
-#else
-        unsigned int numFaces = element.template count<1>();
-#endif
         this->setcurrentsize(numFaces);
 
         // clear assemble data
@@ -221,11 +217,7 @@ public:
      */
     void assembleBoundaryCondition(const Element& element, int k = 1)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         unsigned int numFaces = element.subEntities(1);
-#else
-        unsigned int numFaces = element.template count<1>();
-#endif
         this->setcurrentsize(numFaces);
 
         // clear assemble data
@@ -242,11 +234,7 @@ public:
     void completeRHS(const Element& element, Dune::FieldVector<int, 2*dim>& local2Global, Vector& f)
     {
         int eIdxGlobal = problem_.variables().index(element);
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         unsigned int numFaces = element.subEntities(1);
-#else
-        unsigned int numFaces = element.template count<1>();
-#endif
 
         Dune::FieldVector<Scalar, 2 * dim> F(0.);
         Scalar dInv = 0.;
@@ -413,11 +401,7 @@ private:
 template<class TypeTag>
 void MimeticTwoPLocalStiffness<TypeTag>::assembleV(const Element& element, int)
 {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
     unsigned int numFaces = element.subEntities(1);
-#else
-    unsigned int numFaces = element.template count<1>();
-#endif
     this->setcurrentsize(numFaces);
 
     int eIdxGlobal = problem_.variables().index(element);
@@ -469,11 +453,7 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element&
         Scalar& dInv,
         Scalar& qmean)
 {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
     unsigned int numFaces = element.subEntities(1);
-#else
-    unsigned int numFaces = element.template count<1>();
-#endif
     this->setcurrentsize(numFaces);
 
     // get global coordinate of cell center
diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh
index b584022143..9e2b598e8a 100644
--- a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh
+++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2p.hh
@@ -406,11 +406,7 @@ public:
     //! Function needed for restart option.
     void serializeEntity(std::ostream &outstream, const Element &element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numFaces = element.subEntities(1);
-#else
-        int numFaces = element.template count<1>();
-#endif
         for (int i=0; i < numFaces; i++)
         {
             int fIdxGlobal = A_.faceMapper().map(element, i, 1);
@@ -420,11 +416,7 @@ public:
 
     void deserializeEntity(std::istream &instream, const Element &element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numFaces = element.subEntities(1);
-#else
-        int numFaces = element.template count<1>();
-#endif
         for (int i=0; i < numFaces; i++)
         {
             int fIdxGlobal = A_.faceMapper().map(element, i, 1);
diff --git a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2padaptive.hh b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2padaptive.hh
index dd93fb0f0e..a142b533bd 100644
--- a/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2padaptive.hh
+++ b/dumux/decoupled/2p/diffusion/mimetic/mimeticpressure2padaptive.hh
@@ -418,11 +418,7 @@ public:
     //! Function needed for restart option.
     void serializeEntity(std::ostream &outstream, const Element &element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numFaces = element.subEntities(1);
-#else
-        int numFaces = element.template count<1>();
-#endif
         for (int i=0; i < numFaces; i++)
         {
             int isIdxGlobal = A_.intersectionMapper().map(element, i);
@@ -432,11 +428,7 @@ public:
 
     void deserializeEntity(std::istream &instream, const Element &element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numFaces = element.subEntities(1);
-#else
-        int numFaces = element.template count<1>();
-#endif
         for (int i=0; i < numFaces; i++)
         {
             int isIdxGlobal = A_.intersectionMapper().map(element, i);
diff --git a/dumux/decoupled/2p/impes/gridadaptionindicator2p.hh b/dumux/decoupled/2p/impes/gridadaptionindicator2p.hh
index 5aef330f70..1382b7b8b2 100644
--- a/dumux/decoupled/2p/impes/gridadaptionindicator2p.hh
+++ b/dumux/decoupled/2p/impes/gridadaptionindicator2p.hh
@@ -166,11 +166,7 @@ public:
      */
     bool refine(const Element& element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         return (indicatorVector_[problem_.elementMapper().index(element)] > refineBound_);
-#else
-        return (indicatorVector_[problem_.elementMapper().map(element)] > refineBound_);
-#endif
     }
 
     /*! \brief Indicator function for marking of grid cells for coarsening
@@ -181,11 +177,7 @@ public:
      */
     bool coarsen(const Element& element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         return (indicatorVector_[problem_.elementMapper().index(element)] < coarsenBound_);
-#else
-        return (indicatorVector_[problem_.elementMapper().map(element)] < coarsenBound_);
-#endif
     }
 
     /*! \brief Initializes the adaption indicator class*/
diff --git a/dumux/decoupled/2p/impes/gridadaptionindicator2plocal.hh b/dumux/decoupled/2p/impes/gridadaptionindicator2plocal.hh
index e3a1c2235b..050ca7e758 100644
--- a/dumux/decoupled/2p/impes/gridadaptionindicator2plocal.hh
+++ b/dumux/decoupled/2p/impes/gridadaptionindicator2plocal.hh
@@ -229,11 +229,7 @@ public:
      */
     bool refine(const Element& element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         return (indicatorVector_[problem_.elementMapper().index(element)] > refineBound_);
-#else
-        return (indicatorVector_[problem_.elementMapper().map(element)] > refineBound_);
-#endif
     }
 
     /*! \brief Indicator function for marking of grid cells for coarsening
@@ -244,11 +240,7 @@ public:
      */
     bool coarsen(const Element& element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         return (indicatorVector_[problem_.elementMapper().index(element)] < coarsenBound_);
-#else
-        return (indicatorVector_[problem_.elementMapper().map(element)] < coarsenBound_);
-#endif
     }
 
     /*! \brief Initializes the adaption indicator class*/
diff --git a/dumux/decoupled/common/gridadaptinitializationindicator.hh b/dumux/decoupled/common/gridadaptinitializationindicator.hh
index 15598bb314..65ee9911b9 100644
--- a/dumux/decoupled/common/gridadaptinitializationindicator.hh
+++ b/dumux/decoupled/common/gridadaptinitializationindicator.hh
@@ -318,11 +318,8 @@ public:
      */
     bool refine(const Element& element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int idx = problem_.elementMapper().index(element);
-#else
-        int idx = problem_.elementMapper().map(element);
-#endif
+
         if (indicatorVector_[idx] == refineCell)
             return true;
         else if (maxLevel_ == maxAllowedLevel_)
@@ -339,11 +336,8 @@ public:
      */
     bool coarsen(const Element& element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int idx = problem_.elementMapper().index(element);
-#else
-        int idx = problem_.elementMapper().map(element);
-#endif
+
         if (indicatorVector_[idx] == coarsenCell && maxLevel_ < maxAllowedLevel_)
             return true;
         else if (indicatorVector_[idx] == coarsenCell && !adaptionIndicator_.refine(element))
diff --git a/dumux/decoupled/common/variableclass.hh b/dumux/decoupled/common/variableclass.hh
index 039ecea598..13c5157f21 100644
--- a/dumux/decoupled/common/variableclass.hh
+++ b/dumux/decoupled/common/variableclass.hh
@@ -139,11 +139,7 @@ public:
      */
     int index(const Element& element) const
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         return elementMapper_.index(element);
-#else
-        return elementMapper_.map(element);
-#endif
     }
 
     //! Get index of vertex (codim dim entity)
@@ -153,11 +149,7 @@ public:
      */
     int index(const Vertex& vertex) const
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         return vertexMapper_.index(vertex);
-#else
-        return vertexMapper_.map(vertex);
-#endif
     }
 
     //!Return gridView
diff --git a/dumux/geomechanics/el1p2c/el1p2celementvolumevariables.hh b/dumux/geomechanics/el1p2c/el1p2celementvolumevariables.hh
index 63d8329e38..d131434aec 100644
--- a/dumux/geomechanics/el1p2c/el1p2celementvolumevariables.hh
+++ b/dumux/geomechanics/el1p2c/el1p2celementvolumevariables.hh
@@ -102,11 +102,8 @@ public:
     {
         // we assert that the i-th shape function is
         // associated to the i-th vert of the element.
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numScv = element.subEntities(dim);
-#else
-        int numScv = element.template count<dim>();
-#endif
+
         // number of faces which contribute to the porosity value in the sub-control volume
         std::vector<double>  numContributingFaces;
         numContributingFaces.resize(numScv);
diff --git a/dumux/geomechanics/el1p2c/el1p2cvolumevariables.hh b/dumux/geomechanics/el1p2c/el1p2cvolumevariables.hh
index cc1f68f56c..68f1977069 100644
--- a/dumux/geomechanics/el1p2c/el1p2cvolumevariables.hh
+++ b/dumux/geomechanics/el1p2c/el1p2cvolumevariables.hh
@@ -73,11 +73,7 @@ public:
     {
 
         ParentType::update(priVars, problem, element, fvGeometry, scvIdx, isOldSol);
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdxGlobal = problem.vertexMapper().subIndex(element, scvIdx, dim);
-#else
-        int vIdxGlobal = problem.vertexMapper().map(element, scvIdx, dim);
-#endif
 
         primaryVars_ = priVars;
         prevPrimaryVars_ = problem.model().prevSol()[vIdxGlobal];
diff --git a/dumux/geomechanics/el2p/el2passembler.hh b/dumux/geomechanics/el2p/el2passembler.hh
index 80a627c750..261542eb93 100644
--- a/dumux/geomechanics/el2p/el2passembler.hh
+++ b/dumux/geomechanics/el2p/el2passembler.hh
@@ -434,11 +434,8 @@ public:
         if (!enablePartialReassemble)
             return Red; // reassemble unconditionally!
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdxGlobal = vertexMapper_().subIndex(element, vIdx, dim);
-#else
-        int vIdxGlobal = vertexMapper_().map(element, vIdx, dim);
-#endif
+
         return vertexColor_[vIdxGlobal];
     }
 
diff --git a/dumux/geomechanics/el2p/el2pbasemodel.hh b/dumux/geomechanics/el2p/el2pbasemodel.hh
index cadd45d114..21334d5f10 100644
--- a/dumux/geomechanics/el2p/el2pbasemodel.hh
+++ b/dumux/geomechanics/el2p/el2pbasemodel.hh
@@ -136,19 +136,11 @@ public:
         if (!isBox || !enableHints_)
             return;
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int n = element.subEntities(dim);
-#else
-        int n = element.template count<dim>();
-#endif
         prevVolVars.resize(n);
         curVolVars.resize(n);
         for (int i = 0; i < n; ++i) {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = vertexMapper().subIndex(element, i, dim);
-#else
-            int vIdxGlobal = vertexMapper().map(element, i, dim);
-#endif
 
             if (!hintsUsable_[vIdxGlobal]) {
                 curVolVars[i].setHint(NULL);
@@ -167,18 +159,10 @@ public:
         if (!isBox || !enableHints_)
             return;
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int n = element.subEntities(dim);
-#else
-        int n = element.template count<dim>();
-#endif
         curVolVars.resize(n);
         for (int i = 0; i < n; ++i) {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = vertexMapper().subIndex(element, i, dim);
-#else
-            int vIdxGlobal = vertexMapper().map(element, i, dim);
-#endif
 
             if (!hintsUsable_[vIdxGlobal])
                 curVolVars[i].setHint(NULL);
@@ -202,11 +186,7 @@ public:
             return;
 
         for (unsigned int i = 0; i < elemVolVars.size(); ++i) {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = vertexMapper().subIndex(element, i, dim);
-#else
-            int vIdxGlobal = vertexMapper().map(element, i, dim);
-#endif
             curHints_[vIdxGlobal] = elemVolVars[i];
             if (!hintsUsable_[vIdxGlobal])
                 prevHints_[vIdxGlobal] = elemVolVars[i];
@@ -777,11 +757,7 @@ public:
     bool onBoundary(const Element &element, const int vIdx) const
     {
         if (isBox)
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             return onBoundary(vertexMapper().subIndex(element, vIdx, dim));
-#else
-            return onBoundary(vertexMapper().map(element, vIdx, dim));
-#endif
         else
             DUNE_THROW(Dune::InvalidStateException,
                        "requested for cell-centered model");
@@ -964,21 +940,13 @@ protected:
                                                                    1,
                                                                    faceVertexIdx,
                                                                    dim);
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                             int vIdxGlobal = vertexMapper().subIndex(*eIt, vIdx, dim);
-#else
-                            int vIdxGlobal = vertexMapper().map(*eIt, vIdx, dim);
-#endif
                             boundaryIndices_[vIdxGlobal] = true;
                         }
                     }
                     else
                     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                         int eIdxGlobal = elementMapper().index(*eIt);
-#else
-                        int eIdxGlobal = elementMapper().map(*eIt);
-#endif
                         boundaryIndices_[eIdxGlobal] = true;
                     }
                 }
diff --git a/dumux/geomechanics/el2p/el2pelementvolumevariables.hh b/dumux/geomechanics/el2p/el2pelementvolumevariables.hh
index 63f931831d..91fb06bde2 100644
--- a/dumux/geomechanics/el2p/el2pelementvolumevariables.hh
+++ b/dumux/geomechanics/el2p/el2pelementvolumevariables.hh
@@ -124,11 +124,7 @@ public:
         const DisplacementLFS& displacementLFS = localFunctionSpace.template child<1>();
         typedef typename DisplacementLFS::template Child<0>::Type ScalarDispLFS;
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numScv = element.subEntities(dim);
-#else
-        int numScv = element.template count<dim>();
-#endif
         this->resize(numScv);
 
         for (int scvIdx = 0; scvIdx < numScv; scvIdx++)
@@ -187,11 +183,7 @@ public:
                 const FVElementGeometry &fvGeometry,
                 bool isOldSol)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numScv = element.subEntities(dim);
-#else
-        int numScv = element.template count<dim>();
-#endif
 
         // retrieve the current or the previous solution vector and write the values into globalSol
         const SolutionVector &globalSol =
diff --git a/dumux/geomechanics/el2p/el2plocaloperator.hh b/dumux/geomechanics/el2p/el2plocaloperator.hh
index 8ca2e1ce8b..0b6b187f4f 100644
--- a/dumux/geomechanics/el2p/el2plocaloperator.hh
+++ b/dumux/geomechanics/el2p/el2plocaloperator.hh
@@ -129,11 +129,8 @@ public:
         typedef typename PressSatLFS::template Child<1>::Type SatLFS;
         const SatLFS& satLFS = pressSatLFS.template child<1>();
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         unsigned int numScv = eg.entity().subEntities(dim);
-#else
-        unsigned int numScv = eg.entity().template count<dim>();
-#endif
+
         for (size_type i = 0; i < (numEq-dim) * numScv; i++)
         {
             // retrieve the local residual value for vertex=i%Vertices and equation i/numScv (here 0 or 1)
@@ -535,11 +532,7 @@ public:
         typedef Dune::PDELab::LocalVector<R> LocalResidualVector;
         typedef Dune::PDELab::WeightedVectorAccumulationView<LocalResidualVector> ResidualView;
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         unsigned int numScv = eg.entity().subEntities(dim);
-#else
-        unsigned int numScv = eg.entity().template count<dim>();
-#endif
 
         // loop over all degrees of freedom of the current element
         for (size_type j = 0; j < numScv*numEq; j++)
diff --git a/dumux/implicit/2p/2pgridadaptindicator.hh b/dumux/implicit/2p/2pgridadaptindicator.hh
index 7b431c115b..6934219bea 100644
--- a/dumux/implicit/2p/2pgridadaptindicator.hh
+++ b/dumux/implicit/2p/2pgridadaptindicator.hh
@@ -123,11 +123,7 @@ public:
 
                 for (int i = 0; i < shapeVal.size(); ++i)
                   {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                      int dofIdxGlobal = problem_.model().dofMapper().subIndex(*eIt, i, dofCodim);
-#else
-                     int dofIdxGlobal = problem_.model().dofMapper().map(*eIt, i, dofCodim);
-#endif
                       satI += shapeVal[i]*problem_.model().curSol()[dofIdxGlobal][saturationIdx];
                   }
         	}
@@ -145,11 +141,7 @@ public:
                 {
                     // Access neighbor
                     auto outside = intersection.outside();
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                     int globalIdxJ = problem_.elementMapper().index(outside);
-#else
-                    int globalIdxJ = problem_.elementMapper().map(outside);
-#endif
 
                     // Visit intersection only once
                     if (eIt->level() > outside.level() || (eIt->level() == outside.level() && globalIdxI < globalIdxJ))
@@ -171,11 +163,8 @@ public:
 
                             for (int i = 0; i < shapeVal.size(); ++i)
                               {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                                   int dofIdxGlobal = problem_.model().dofMapper().subIndex(outside, i, dofCodim);
-#else
-                                  int dofIdxGlobal = problem_.model().dofMapper().map(outside, i, dofCodim);
-#endif
+
                                   satJ += shapeVal[i]*problem_.model().curSol()[dofIdxGlobal][saturationIdx];
                               }
                     	}
@@ -217,11 +206,7 @@ public:
      */
     bool refine(const Element& element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         return (indicatorVector_[problem_.elementMapper().index(element)] > refineBound_);
-#else
-        return (indicatorVector_[problem_.elementMapper().map(element)] > refineBound_);
-#endif
     }
 
     /*! \brief Indicator function for marking of grid cells for coarsening
@@ -232,11 +217,7 @@ public:
      */
     bool coarsen(const Element& element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         return (indicatorVector_[problem_.elementMapper().index(element)] < coarsenBound_);
-#else
-        return (indicatorVector_[problem_.elementMapper().map(element)] < coarsenBound_);
-#endif
     }
 
     /*! \brief Initializes the adaptation indicator class*/
diff --git a/dumux/implicit/2p2c/2p2cvolumevariables.hh b/dumux/implicit/2p2c/2p2cvolumevariables.hh
index e67df9be2a..0f52a73e6c 100644
--- a/dumux/implicit/2p2c/2p2cvolumevariables.hh
+++ b/dumux/implicit/2p2c/2p2cvolumevariables.hh
@@ -185,11 +185,7 @@ public:
         Scalar t = Implementation::temperature_(priVars, problem, element,
                                                 fvGeometry, scvIdx);
         fluidState.setTemperature(t);
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int dofIdxGlobal = problem.model().dofMapper().subIndex(element, scvIdx, dofCodim);
-#else
-        int dofIdxGlobal = problem.model().dofMapper().map(element, scvIdx, dofCodim);
-#endif
         int phasePresence = problem.model().phasePresence(dofIdxGlobal, isOldSol);
 
         /////////////
diff --git a/dumux/implicit/2pnc/2pncvolumevariables.hh b/dumux/implicit/2pnc/2pncvolumevariables.hh
index ba09ab3e29..6a6bb92d52 100644
--- a/dumux/implicit/2pnc/2pncvolumevariables.hh
+++ b/dumux/implicit/2pnc/2pncvolumevariables.hh
@@ -190,11 +190,7 @@ public:
                                                 fvGeometry, scvIdx);
         fluidState.setTemperature(t);
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int dofIdxGlobal = problem.model().dofMapper().subIndex(element, scvIdx, dofCodim);
-#else
-        int dofIdxGlobal = problem.model().dofMapper().map(element, scvIdx, dofCodim);
-#endif
         int phasePresence = problem.model().phasePresence(dofIdxGlobal, isOldSol);
 
         /////////////
diff --git a/dumux/implicit/2pncmin/2pncminvolumevariables.hh b/dumux/implicit/2pncmin/2pncminvolumevariables.hh
index bc2671b106..1b7391af03 100644
--- a/dumux/implicit/2pncmin/2pncminvolumevariables.hh
+++ b/dumux/implicit/2pncmin/2pncminvolumevariables.hh
@@ -223,11 +223,7 @@ public:
         Scalar t = Implementation::temperature_(priVars, problem, element,fvGeometry, scvIdx);
         fluidState.setTemperature(t);
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int dofIdxGlobal = problem.model().dofMapper().subIndex(element, scvIdx, dofCodim);
-#else
-        int dofIdxGlobal = problem.model().dofMapper().map(element, scvIdx, dofCodim);
-#endif   
         int phasePresence = problem.model().phasePresence(dofIdxGlobal, isOldSol);
 
         /////////////
diff --git a/dumux/implicit/3p3c/3p3cvolumevariables.hh b/dumux/implicit/3p3c/3p3cvolumevariables.hh
index b60425be38..0b23256752 100644
--- a/dumux/implicit/3p3c/3p3cvolumevariables.hh
+++ b/dumux/implicit/3p3c/3p3cvolumevariables.hh
@@ -127,11 +127,7 @@ public:
         const MaterialLawParams &materialParams =
             problem.spatialParams().materialLawParams(element, fvGeometry, scvIdx);
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int dofIdxGlobal = problem.model().dofMapper().subIndex(element, scvIdx, dofCodim);
-#else
-        int dofIdxGlobal = problem.model().dofMapper().map(element, scvIdx, dofCodim);
-#endif
         int phasePresence = problem.model().phasePresence(dofIdxGlobal, isOldSol);
 
         Scalar temp = Implementation::temperature_(priVars, problem, element, fvGeometry, scvIdx);
diff --git a/dumux/implicit/adaptive/adaptionhelper.hh b/dumux/implicit/adaptive/adaptionhelper.hh
index ce029d655f..5f3bff2a05 100644
--- a/dumux/implicit/adaptive/adaptionhelper.hh
+++ b/dumux/implicit/adaptive/adaptionhelper.hh
@@ -394,20 +394,12 @@ public:
 
     int dofIndex(const Problem& problem, const DofEntity& entity) const
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 return problem.model().dofMapper().index(entity);
-#else
-                return problem.model().dofMapper().map(entity);
-#endif
     }
 
     int elementIndex(const Problem& problem, const Element& element) const
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 return problem.elementMapper().index(element);
-#else
-                return problem.elementMapper().map(element);
-#endif
     }
 
 };
diff --git a/dumux/implicit/adaptive/gridadaptinitializationindicator.hh b/dumux/implicit/adaptive/gridadaptinitializationindicator.hh
index 237e82a922..9b55d36427 100644
--- a/dumux/implicit/adaptive/gridadaptinitializationindicator.hh
+++ b/dumux/implicit/adaptive/gridadaptinitializationindicator.hh
@@ -216,11 +216,7 @@ public:
         for (ElementIterator eIt = problem_.gridView().template begin<0>(); eIt != eEndIt; ++eIt)
         {
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int globalIdxI = problem_.elementMapper().index(*eIt);
-#else
-            int globalIdxI = problem_.elementMapper().map(*eIt);
-#endif
             int level = eIt->level();
             maxLevel_ = std::max(level, maxLevel_);
 
@@ -284,11 +280,8 @@ public:
      */
     bool refine(const Element& element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int idx = problem_.elementMapper().index(element);
-#else
-        int idx = problem_.elementMapper().map(element);
-#endif
+
         if (indicatorVector_[idx] == refineCell)
             return true;
         else if (maxLevel_ == maxAllowedLevel_)
diff --git a/dumux/implicit/box/boxassembler.hh b/dumux/implicit/box/boxassembler.hh
index 114091a3e3..c43fb74a05 100644
--- a/dumux/implicit/box/boxassembler.hh
+++ b/dumux/implicit/box/boxassembler.hh
@@ -280,11 +280,7 @@ private:
         const ElementIterator eEndIt = this->gridView_().template end<0>();
         for (; eIt != eEndIt; ++eIt) {
             const Element &element = *eIt;
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int numVerticesLocal = element.subEntities(dim);
-#else
-            int numVerticesLocal = element.template count<dim>();
-#endif
 
             // if the element is not in the interior or the process
             // border, all dofs just contain main-diagonal entries
@@ -367,11 +363,8 @@ private:
 
         this->model_().localJacobian().assemble(element);
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numVerticesLocal = element.subEntities(dim);
-#else
-        int numVerticesLocal = element.template count<dim>();
-#endif
+
         for (int i=0; i < numVerticesLocal; ++ i) {
 #if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int globI = this->vertexMapper_().subIndex(element, i, dim);
@@ -418,11 +411,8 @@ private:
     {
         this->model_().localResidual().eval(element);
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numVerticesLocal = element.subEntities(dim);
-#else
-        int numVerticesLocal = element.template count<dim>();
-#endif
+
         for (int i = 0; i < numVerticesLocal; ++ i) {
 #if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int globI = this->vertexMapper_().subIndex(element, i, dim);
@@ -440,11 +430,8 @@ private:
     // "assemble" a ghost element
     void assembleGhostElement_(const Element &element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numVerticesLocal = element.subEntities(dim);
-#else
-        int numVerticesLocal = element.template count<dim>();
-#endif
+
         for (int i=0; i < numVerticesLocal; ++i) {
             auto vertex = element.template subEntity<dim>(i);
 
diff --git a/dumux/implicit/box/boxelementboundarytypes.hh b/dumux/implicit/box/boxelementboundarytypes.hh
index 2a1f91e3b6..661640aa0f 100644
--- a/dumux/implicit/box/boxelementboundarytypes.hh
+++ b/dumux/implicit/box/boxelementboundarytypes.hh
@@ -81,11 +81,7 @@ public:
     void update(const Problem &problem,
                 const Element &element)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numVertices = element.subEntities(dim);
-#else
-        int numVertices = element.template count<dim>();
-#endif
 
         this->resize(numVertices);
 
diff --git a/dumux/implicit/box/boxelementvolumevariables.hh b/dumux/implicit/box/boxelementvolumevariables.hh
index 773b5abf33..f18cb601c6 100644
--- a/dumux/implicit/box/boxelementvolumevariables.hh
+++ b/dumux/implicit/box/boxelementvolumevariables.hh
@@ -78,11 +78,7 @@ public:
         const VertexMapper &vertexMapper = problem.vertexMapper();
         // we assert that the i-th shape function is
         // associated to the i-th vertex of the element.
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numVertices = element.subEntities(dim);
-#else
-        int numVertices = element.template count<dim>();
-#endif
         this->resize(numVertices);
         for (int scvIdx = 0; scvIdx < numVertices; scvIdx++) {
 #if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
@@ -124,11 +120,7 @@ public:
                       const FVElementGeometry &fvGeometry,
                       const ElementSolutionVector& elementSolVector)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int numVertices = element.subEntities(dim);
-#else
-        int numVertices = element.template count<dim>();
-#endif
         this->resize(numVertices);
         for (int scvIdx = 0; scvIdx < numVertices; scvIdx++)
         {
diff --git a/dumux/implicit/box/intersectiontovertexbc.hh b/dumux/implicit/box/intersectiontovertexbc.hh
index 4f130c1e82..87c5de75ea 100644
--- a/dumux/implicit/box/intersectiontovertexbc.hh
+++ b/dumux/implicit/box/intersectiontovertexbc.hh
@@ -85,11 +85,7 @@ public:
                 for (int faceVertexIdx = 0; faceVertexIdx < numFaceVerts; ++faceVertexIdx)
                 {
                     int vIdx = refElement.subEntity(fIdx, 1, faceVertexIdx, dim);
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                     int vIdxGlobal = problem.vertexMapper().subIndex(*eIt, vIdx, dim);
-#else
-                    int vIdxGlobal = problem.vertexMapper().map(*eIt, vIdx, dim);
-#endif
                     for (int eqIdx = 0; eqIdx < numEq; eqIdx++)
                       if (bcTypes.isDirichlet(eqIdx))
                           vertexBC[vIdxGlobal].setDirichlet(eqIdx);
@@ -101,11 +97,8 @@ public:
     void boundaryTypes(BoundaryTypes& values, const Vertex& vertex) const
     {
         values.setAllNeumann();
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdxGlobal = problem_.vertexMapper().index(vertex);
-#else
-        int vIdxGlobal = problem_.vertexMapper().map(vertex);
-#endif
+
 	const BoundaryTypes& bcTypes = vertexBC[vIdxGlobal];
 
         for (int eqIdx = 0; eqIdx < numEq; eqIdx++)
diff --git a/dumux/implicit/common/implicitassembler.hh b/dumux/implicit/common/implicitassembler.hh
index f38fc56f0e..7d5b7ea8be 100644
--- a/dumux/implicit/common/implicitassembler.hh
+++ b/dumux/implicit/common/implicitassembler.hh
@@ -334,11 +334,7 @@ public:
         if (!enablePartialReassemble_())
             return Red; // reassemble unconditionally!
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdxGlobal = vertexMapper_().subIndex(element, vIdx, dim);
-#else
-        int vIdxGlobal = vertexMapper_().map(element, vIdx, dim);
-#endif
         return vertexColor_[vIdxGlobal];
     }
 
@@ -364,11 +360,7 @@ public:
         if (!enablePartialReassemble_())
             return Red; // reassemble unconditionally!
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int eIdxGlobal = elementMapper_().index(element);
-#else
-        int eIdxGlobal = elementMapper_().map(element);
-#endif
         return elementColor_[eIdxGlobal];
     }
 
diff --git a/dumux/implicit/common/implicitlocaljacobian.hh b/dumux/implicit/common/implicitlocaljacobian.hh
index 5079c34b9d..f580a811bc 100644
--- a/dumux/implicit/common/implicitlocaljacobian.hh
+++ b/dumux/implicit/common/implicitlocaljacobian.hh
@@ -410,11 +410,7 @@ protected:
         auto neighbor = element_();
         if (isBox)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             dofIdxGlobal = vertexMapper_().subIndex(element_(), col, dim);
-#else
-            dofIdxGlobal = vertexMapper_().map(element_(), col, dim);
-#endif
         }
         else
         {
diff --git a/dumux/implicit/common/implicitmodel.hh b/dumux/implicit/common/implicitmodel.hh
index f14e6f9923..86fcd13e83 100644
--- a/dumux/implicit/common/implicitmodel.hh
+++ b/dumux/implicit/common/implicitmodel.hh
@@ -137,20 +137,12 @@ public:
         if (!isBox || !enableHints_)
             return;
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int n = element.subEntities(dim);
-#else
-        int n = element.template count<dim>();
-#endif
         prevVolVars.resize(n);
         curVolVars.resize(n);
         for (int i = 0; i < n; ++i)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = vertexMapper().subIndex(element, i, dim);
-#else
-            int vIdxGlobal = vertexMapper().map(element, i, dim);
-#endif
 
             if (!hintsUsable_[vIdxGlobal]) {
                 curVolVars[i].setHint(NULL);
@@ -169,19 +161,11 @@ public:
         if (!isBox || !enableHints_)
             return;
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int n = element.subEntities(dim);
-#else
-        int n = element.template count<dim>();
-#endif
         curVolVars.resize(n);
         for (int i = 0; i < n; ++i)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = vertexMapper().subIndex(element, i, dim);
-#else
-            int vIdxGlobal = vertexMapper().map(element, i, dim);
-#endif
 
             if (!hintsUsable_[vIdxGlobal])
                 curVolVars[i].setHint(NULL);
@@ -206,11 +190,7 @@ public:
 
         for (unsigned int i = 0; i < elemVolVars.size(); ++i)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = vertexMapper().subIndex(element, i, dim);
-#else
-            int vIdxGlobal = vertexMapper().map(element, i, dim);
-#endif
             curHints_[vIdxGlobal] = elemVolVars[i];
             if (!hintsUsable_[vIdxGlobal])
                 prevHints_[vIdxGlobal] = elemVolVars[i];
@@ -266,11 +246,7 @@ public:
             }
             else
             {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int globalI = elementMapper().index(*eIt);
-#else
-                int globalI = elementMapper().map(*eIt);
-#endif
                 residual[globalI] = localResidual().residual(0);
             }
         }
@@ -615,11 +591,7 @@ public:
     void serializeEntity(std::ostream &outstream,
                          const Entity &entity)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int dofIdxGlobal = dofMapper().index(entity);
-#else
-        int dofIdxGlobal = dofMapper().map(entity);
-#endif
 
         // write phase state
         if (!outstream.good()) {
@@ -647,11 +619,7 @@ public:
     void deserializeEntity(std::istream &instream,
                            const Entity &entity)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int dofIdxGlobal = dofMapper().index(entity);
-#else
-        int dofIdxGlobal = dofMapper().map(entity);
-#endif
 
         for (int eqIdx = 0; eqIdx < numEq; ++eqIdx) {
             if (!instream.good())
@@ -861,11 +829,7 @@ public:
     bool onBoundary(const Element &element, const int vIdx) const
     {
         if (isBox)
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             return onBoundary(vertexMapper().subIndex(element, vIdx, dim));
-#else
-            return onBoundary(vertexMapper().map(element, vIdx, dim));
-#endif
         else
             DUNE_THROW(Dune::InvalidStateException,
                        "requested for cell-centered model");
@@ -882,11 +846,7 @@ public:
     bool onBoundary(const Element &element) const
     {
         if (!isBox)
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             return onBoundary(elementMapper().index(element));
-#else
-            return onBoundary(elementMapper().map(element));
-#endif
 
         else
             DUNE_THROW(Dune::InvalidStateException,
@@ -968,11 +928,7 @@ protected:
             for (int scvIdx = 0; scvIdx < fvGeometry.numScv; scvIdx++)
             {
                 // get the global index of the degree of freedom
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int dofIdxGlobal = dofMapper().subIndex(*eIt, scvIdx, dofCodim);
-#else
-                int dofIdxGlobal = dofMapper().map(*eIt, scvIdx, dofCodim);
-#endif
 
                 // let the problem do the dirty work of nailing down
                 // the initial solution.
@@ -1057,21 +1013,13 @@ protected:
                                                             1,
                                                             faceVertexIdx,
                                                             dim);
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                             int vIdxGlobal = vertexMapper().subIndex(*eIt, vIdx, dim);
-#else
-                            int vIdxGlobal = vertexMapper().map(*eIt, vIdx, dim);
-#endif
                             boundaryIndices_[vIdxGlobal] = true;
                         }
                     }
                     else
                     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                         int eIdxGlobal = elementMapper().index(*eIt);
-#else
-                        int eIdxGlobal = elementMapper().map(*eIt);
-#endif
                         boundaryIndices_[eIdxGlobal] = true;
                     }
                 }
diff --git a/dumux/implicit/common/implicitvelocityoutput.hh b/dumux/implicit/common/implicitvelocityoutput.hh
index be8fc351c3..4e6e49d8b8 100644
--- a/dumux/implicit/common/implicitvelocityoutput.hh
+++ b/dumux/implicit/common/implicitvelocityoutput.hh
@@ -97,11 +97,7 @@ public:
 
                     for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
                     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                         int vIdxGlobal = problem_.vertexMapper().subIndex(*eIt, scvIdx, dofCodim);
-#else
-                        int vIdxGlobal = problem_.vertexMapper().map(*eIt, scvIdx, dofCodim);
-#endif
                         cellNum_[vIdxGlobal] += 1;
                     }
                 }
@@ -206,11 +202,8 @@ public:
                 // transform vertex velocities from local to global coordinates
                 for (int scvIdx = 0; scvIdx < fvGeometry.numScv; ++scvIdx)
                 {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                     int vIdxGlobal = problem_.vertexMapper().subIndex(element, scvIdx, dofCodim);
-#else
-                    int vIdxGlobal = problem_.vertexMapper().map(element, scvIdx, dofCodim);
-#endif
+
                     // calculate the subcontrolvolume velocity by the Piola transformation
                     Dune::FieldVector<CoordScalar, dimWorld> scvVelocity(0);
 
@@ -323,11 +316,7 @@ public:
 
                 scvVelocity /= geometry.integrationElement(localPos);
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int eIdxGlobal = problem_.elementMapper().index(element);
-#else
-                int eIdxGlobal = problem_.elementMapper().map(element);
-#endif
 
                 velocity[eIdxGlobal]= scvVelocity;
             }
diff --git a/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh b/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh
index fb1dca130f..ebbc76e8be 100644
--- a/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh
+++ b/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh
@@ -210,11 +210,8 @@ public:
 
         // setting the dimensionless numbers.
         // obtaining the respective quantities.
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         const unsigned int globalVertexIdx = problem.vertexMapper().subIndex(element, scvIdx, dim);
-#else
-        const unsigned int globalVertexIdx = problem.vertexMapper().map(element, scvIdx, dim);
-#endif
+
         for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
             const Scalar darcyMagVelocity     = problem.model().volumeDarcyMagVelocity(phaseIdx, globalVertexIdx);
             const Scalar dynamicViscosity     = fluidState.viscosity(phaseIdx);
@@ -385,11 +382,8 @@ public:
 
         // setting the dimensionless numbers.
         // obtaining the respective quantities.
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         const unsigned int globalVertexIdx = problem.vertexMapper().subIndex(element, scvIdx, dim);
-#else
-        const unsigned int globalVertexIdx = problem.vertexMapper().map(element, scvIdx, dim);
-#endif
+
         for (int phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx) {
             const Scalar darcyMagVelocity     = problem.model().volumeDarcyMagVelocity(phaseIdx, globalVertexIdx);
             const Scalar dynamicViscosity     = fluidState.viscosity(phaseIdx);
diff --git a/dumux/io/artgridcreator.hh b/dumux/io/artgridcreator.hh
index 5f5727a248..75e705e75d 100644
--- a/dumux/io/artgridcreator.hh
+++ b/dumux/io/artgridcreator.hh
@@ -539,11 +539,8 @@ public:
               // Loop over element faces
               for (int i = 0; i < refElement.size(1); i++)
               {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                   int indexFace = faceMapper_.subIndex(*eIt, i, 1);
-#else
-                  int indexFace = faceMapper_.map(*eIt, i, 1);
-#endif
+
                   /*
                   * it maps the local element vertices "localV1Idx" -> indexVertex1
                   * then it gets the coordinates of the nodes in the ART file and
@@ -551,17 +548,9 @@ public:
                   */
                   int localV1Idx = refElement.subEntity(i, 1, 0, dim);
                   int localV2Idx = refElement.subEntity(i, 1, 1, dim);
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                   int indexVertex1 = vertexMapper_.subIndex(*eIt, localV1Idx, dim);
-#else
-                  int indexVertex1 = vertexMapper_.map(*eIt, localV1Idx, dim);
-#endif
-
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                   int indexVertex2 = vertexMapper_.subIndex(*eIt, localV2Idx, dim);
-#else
-                  int indexVertex2 = vertexMapper_.map(*eIt, localV2Idx, dim);
-#endif
+
                   Dune::FieldVector<DT, dim> nodeART_from;
                   Dune::FieldVector<DT, dim> nodeART_to;
                   Dune::FieldVector<DT, dim> nodeDune_from;
diff --git a/dumux/io/plotoverline2d.hh b/dumux/io/plotoverline2d.hh
index f9fbbdb59b..f47b72d489 100644
--- a/dumux/io/plotoverline2d.hh
+++ b/dumux/io/plotoverline2d.hh
@@ -153,11 +153,8 @@ public:
             for (unsigned int scvIdx=0; scvIdx < numScv; ++scvIdx)
             {
                 // find some global identification
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 const unsigned int vIdxGlobal = problem.vertexMapper().subIndex(*eIt, scvIdx, dim);
-#else
-                const unsigned int vIdxGlobal = problem.vertexMapper().map(*eIt, scvIdx, dim);
-#endif
+
                 // only write out if the vertex was not already visited
                 if (isVisited[vIdxGlobal])
                     continue;
diff --git a/dumux/io/vtknestedfunction.hh b/dumux/io/vtknestedfunction.hh
index bc316e2f90..8e001c2548 100644
--- a/dumux/io/vtknestedfunction.hh
+++ b/dumux/io/vtknestedfunction.hh
@@ -75,11 +75,7 @@ public:
         int idx;
         if (codim_ == 0) {
             // cells. map element to the index
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             idx = mapper_.index(element);
-#else
-            idx = mapper_.map(element);
-#endif
         }
         else if (codim_ == dim) {
             // find vertex which is closest to xi in local
@@ -87,11 +83,8 @@ public:
             double min=1e100;
             int imin=-1;
             Dune::GeometryType geomType = element.type();
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int n = element.subEntities(dim);
-#else
-            int n = element.template count<dim>();
-#endif
+
             for (int i=0; i < n; ++i)
             {
                 Dune::FieldVector<ctype,dim> local =
@@ -105,11 +98,7 @@ public:
             }
 
             // map vertex to an index
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             idx = mapper_.subIndex(element, imin, codim_);
-#else
-            idx = mapper_.map(element, imin, codim_);
-#endif
         }
         else
             DUNE_THROW(Dune::InvalidStateException,
diff --git a/dumux/linear/amgparallelhelpers.hh b/dumux/linear/amgparallelhelpers.hh
index 5cb56cd741..2130bef314 100644
--- a/dumux/linear/amgparallelhelpers.hh
+++ b/dumux/linear/amgparallelhelpers.hh
@@ -59,11 +59,7 @@ class ParallelISTLHelper
         template<class EntityType>
         int map(const EntityType& e) const
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             return problem_.model().dofMapper().index(e);
-#else
-            return problem_.model().dofMapper().map(e);
-#endif
         }
 
     private:
@@ -524,11 +520,7 @@ public:
         {
             if (entityIt->partitionType() == Dune::BorderEntity)
             {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int localIdx = problem_.model().dofMapper().index(*entityIt);
-#else
-                int localIdx = problem_.model().dofMapper().map(*entityIt);
-#endif
                 IdType dofIdxGlobal = gridView.grid().globalIdSet().id(*entityIt);
 
                 std::pair<IdType,int> g2iPair(dofIdxGlobal, localIdx);
@@ -589,11 +581,7 @@ public:
         template<class EntityType>
         size_t size (EntityType& e) const
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int i = problem_.model().dofMapper().index(e);
-#else
-            int i = problem_.model().dofMapper().map(e);
-#endif
             int n = 0;
             for (ColIterator j = A_[i].begin(); j != A_[i].end(); ++j)
             {
@@ -610,11 +598,7 @@ public:
         template<class MessageBuffer, class EntityType>
         void gather (MessageBuffer& buff, const EntityType& e) const
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int i = problem_.model().dofMapper().index(e);
-#else
-            int i = problem_.model().dofMapper().map(e);
-#endif
             for (ColIterator j = A_[i].begin(); j != A_[i].end(); ++j)
             {
                 typename std::map<int,IdType>::const_iterator it=index2GID_.find(j.index());
@@ -629,11 +613,7 @@ public:
         template<class MessageBuffer, class EntityType>
         void scatter (MessageBuffer& buff, const EntityType& e, size_t n)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int i = problem_.model().dofMapper().index(e);
-#else
-            int i = problem_.model().dofMapper().map(e);
-#endif
             for (size_t k = 0; k < n; k++)
             {
                 IdType id;
@@ -717,11 +697,7 @@ public:
         template<class EntityType>
         size_t size (EntityType& e) const
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int i = problem_.model().dofMapper().index(e);
-#else
-            int i = problem_.model().dofMapper().map(e);
-#endif
             int n = 0;
             for (ColIterator j = A_[i].begin(); j != A_[i].end(); ++j)
             {
@@ -738,11 +714,7 @@ public:
         template<class MessageBuffer, class EntityType>
         void gather (MessageBuffer& buff, const EntityType& e) const
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int i = problem_.model().dofMapper().index(e);
-#else
-            int i = problem_.model().dofMapper().map(e);
-#endif
             for (ColIterator j = A_[i].begin(); j != A_[i].end(); ++j)
             {
                 typename std::map<int,IdType>::const_iterator it=index2GID_.find(j.index());
@@ -757,11 +729,7 @@ public:
         template<class MessageBuffer, class EntityType>
         void scatter (MessageBuffer& buff, const EntityType& e, size_t n)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int i = problem_.model().dofMapper().index(e);
-#else
-            int i = problem_.model().dofMapper().map(e);
-#endif
             for (size_t k = 0; k < n; k++)
             {
                 MatEntry m;
diff --git a/dumux/linear/vectorexchange.hh b/dumux/linear/vectorexchange.hh
index 00a71e98eb..49c118be8b 100644
--- a/dumux/linear/vectorexchange.hh
+++ b/dumux/linear/vectorexchange.hh
@@ -66,11 +66,7 @@ public:
   template<class MessageBuffer, class Entity>
   void gather (MessageBuffer& buff, const Entity& entity) const
   {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
       buff.write(dataVector_[mapper_.index(entity)]);
-#else
-      buff.write(dataVector_[mapper_.map(entity)]);
-#endif
   }
 
   /*! unpack data from message buffer to user
@@ -82,12 +78,7 @@ public:
   {
       DataType x;
       buff.read(x);
-
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
       dataVector_[mapper_.index(entity)] = x;
-#else
-      dataVector_[mapper_.map(entity)] = x;
-#endif
   }
 
   //! constructor
diff --git a/dumux/linear/vertexborderlistfromgrid.hh b/dumux/linear/vertexborderlistfromgrid.hh
index 97d2e0dd98..5716697fa6 100644
--- a/dumux/linear/vertexborderlistfromgrid.hh
+++ b/dumux/linear/vertexborderlistfromgrid.hh
@@ -82,11 +82,7 @@ public:
     void gather(MessageBufferImp &buff, const EntityType &e) const
     {
         buff.write(gridView_.comm().rank());
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         buff.write(static_cast<int>(map_.index(e)));
-#else
-        buff.write(static_cast<int>(map_.map(e)));
-#endif
     }
 
     template<class MessageBufferImp, class EntityType>
@@ -94,11 +90,7 @@ public:
     {
         BorderIndex bIdx;
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         bIdx.localIdx = map_.index(e);
-#else
-        bIdx.localIdx = map_.map(e);
-#endif
         buff.read(bIdx.peerRank);
         buff.read(bIdx.peerIdx);
         bIdx.borderDistance = 0;
diff --git a/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh b/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh
index a66ccfd64f..e0938c6c14 100644
--- a/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh
+++ b/dumux/multidomain/2cstokes2p2c/2cstokes2p2clocaloperator.hh
@@ -343,13 +343,8 @@ class TwoCStokesTwoPTwoCLocalOperator :
         cParams.fvGeometry1.update(globalProblem_.sdGridView1(), sdElement1);
         cParams.fvGeometry2.update(globalProblem_.sdGridView2(), sdElement2);
 
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         const int numVertsOfElem1 = sdElement1.subEntities(dim);
         const int numVertsOfElem2 = sdElement2.subEntities(dim);
-#else
-        const int numVertsOfElem1 = sdElement1.template count<dim>();
-        const int numVertsOfElem2 = sdElement2.template count<dim>();
-#endif
 
         //bring the local unknowns x_s into a form that can be passed to elemVolVarsCur.update()
         Dune::BlockVector<Dune::FieldVector<Scalar,1>> elementSol1(0.);
diff --git a/dumux/parallel/vertexhandles.hh b/dumux/parallel/vertexhandles.hh
index a52017c897..42cdc2b72d 100644
--- a/dumux/parallel/vertexhandles.hh
+++ b/dumux/parallel/vertexhandles.hh
@@ -70,22 +70,14 @@ public:
     template<class MessageBufferImp, class EntityType>
     void gather(MessageBufferImp &buff, const EntityType &e) const
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdx = mapper_.index(e);
-#else
-        int vIdx = mapper_.map(e);
-#endif
         buff.write(container_[vIdx]);
     }
 
     template<class MessageBufferImp, class EntityType>
     void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdx = mapper_.index(e);
-#else
-        int vIdx = mapper_.map(e);
-#endif
 
         FieldType tmp;
         buff.read(tmp);
@@ -136,22 +128,14 @@ public:
     template<class MessageBufferImp, class EntityType>
     void gather(MessageBufferImp &buff, const EntityType &e) const
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdx = mapper_.index(e);
-#else
-        int vIdx = mapper_.map(e);
-#endif
         buff.write(container_[vIdx]);
     }
 
     template<class MessageBufferImp, class EntityType>
     void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdx = mapper_.index(e);
-#else
-        int vIdx = mapper_.map(e);
-#endif
 
         FieldType tmp;
         buff.read(tmp);
@@ -203,23 +187,14 @@ public:
     template<class MessageBufferImp, class EntityType>
     void gather(MessageBufferImp &buff, const EntityType &e) const
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdx = mapper_.index(e);
-#else
-        int vIdx = mapper_.map(e);
-#endif
         buff.write(container_[vIdx]);
     }
 
     template<class MessageBufferImp, class EntityType>
     void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdx = mapper_.index(e);
-#else
-        int vIdx = mapper_.map(e);
-#endif
-
         FieldType tmp;
         buff.read(tmp);
         container_[vIdx] = std::min(container_[vIdx], tmp);
diff --git a/test/geomechanics/el2p/el2pproblem.hh b/test/geomechanics/el2p/el2pproblem.hh
index bf15b80114..b5b1ce5f1f 100644
--- a/test/geomechanics/el2p/el2pproblem.hh
+++ b/test/geomechanics/el2p/el2pproblem.hh
@@ -259,11 +259,7 @@ public:
         VertexIterator vEndIt = gridView_.template end<dim>();
         for(; vIt != vEndIt; ++vIt)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = vertexMapper_.index(*vIt);
-#else
-            int vIdxGlobal = vertexMapper_.map(*vIt);
-#endif
             GlobalPosition globalPos = (*vIt).geometry().corner(0);
 
             // initial approximate pressure distribution at start of initialization run
@@ -305,11 +301,7 @@ public:
         VertexIterator vEndIt = gridView_.template end<dim>();
         for(; vIt != vEndIt; ++vIt)
         {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
             int vIdxGlobal = vertexMapper_.index(*vIt);
-#else
-            int vIdxGlobal = vertexMapper_.map(*vIt);
-#endif
             //
             pInit_[vIdxGlobal] = -this->model().curSol().base()[vIdxGlobal*2][0];
         }
@@ -886,11 +878,7 @@ public:
                             gridView_.template end<GridView::dimension> ();
             for (; vIt != vEndIt; ++vIt)
             {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                 int vIdxGlobal = vertexMapper_.index(*vIt);
-#else
-                int vIdxGlobal = vertexMapper_.map(*vIt);
-#endif
                 pInit_[vIdxGlobal] = -pInit[vIdxGlobal];
             }
         }
diff --git a/test/implicit/2pdfm/2pdfmspatialparams.hh b/test/implicit/2pdfm/2pdfmspatialparams.hh
index 301c7544f5..6a82a217bc 100644
--- a/test/implicit/2pdfm/2pdfmspatialparams.hh
+++ b/test/implicit/2pdfm/2pdfmspatialparams.hh
@@ -218,11 +218,7 @@ public:
                                                     const FVElementGeometry &fvGeometry,
                                                     int scvIdx) const
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         DUNE_UNUSED int vIdxGlobal = vertexMapper_.subIndex(element, scvIdx, dim);
-#else
-        DUNE_UNUSED int vIdxGlobal = vertexMapper_.map(element, scvIdx, dim);
-#endif
 
         // be picky if called for non-fracture vertices
         assert(isVertexFracture(vIdxGlobal));
@@ -242,11 +238,7 @@ public:
         {
             return false;
         }
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int vIdxGlobal = vertexMapper_.subIndex(element, localVertexIdx, dim);
-#else
-        int vIdxGlobal = vertexMapper_.map(element, localVertexIdx, dim);
-#endif
         return fractureMapper_.isDuneFractureVertex(vIdxGlobal);
     }
 
@@ -272,11 +264,7 @@ public:
      */
     bool isEdgeFracture(const Element &element, int localFaceIdx) const
     {
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
         int fIdxGlobal = faceMapper_.subIndex(element, localFaceIdx, 1);
-#else
-        int fIdxGlobal = faceMapper_.map(element, localFaceIdx, 1);
-#endif
         return fractureMapper_.isDuneFractureEdge(fIdxGlobal);
     }
 
diff --git a/test/io/gridcreator/test_gridcreator_gmsh.cc b/test/io/gridcreator/test_gridcreator_gmsh.cc
index 6dc87e7447..b2d374e64c 100644
--- a/test/io/gridcreator/test_gridcreator_gmsh.cc
+++ b/test/io/gridcreator/test_gridcreator_gmsh.cc
@@ -75,11 +75,8 @@ public:
                 {
                     // get local vertex index with respect to the element
                     int vIdxLocal = refElement.subEntity(isIt->indexInInside(), 1, vIdx, dim);
-#if DUNE_VERSION_NEWER(DUNE_COMMON, 2, 4)
                     int vIdxGlobal = vertexMapper.subIndex(*eIt, vIdxLocal, dim);
-#else
-                    int vIdxGlobal = vertexMapper.map(*eIt, vIdxLocal, dim);
-#endif
+
                     // make sure we always take the lowest non-zero marker (problem dependent!)
                     if (boundaryMarker[vIdxGlobal] == 0)
                         boundaryMarker[vIdxGlobal] = GridCreator::getBoundaryDomainMarker(isIt->boundarySegmentIndex());
-- 
GitLab