From 539d8f4f7445bc42a9e2b89d1cf259f29cc01317 Mon Sep 17 00:00:00 2001
From: Christoph Grueninger <christoph.grueninger@iws.uni-stuttgart.de>
Date: Wed, 8 Oct 2014 09:46:23 +0000
Subject: [PATCH] Revert r13462, it broke compatibility with Dune 2.3.

As we use still ints for mapping face indices, there
is more work involved.
(thanks to bernd for the heads-up)


git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@13466 2fb0f335-1f38-0410-981e-8018bf24f1b0
---
 dumux/common/intersectionmapper.hh | 20 ++++++++++----------
 dumux/parallel/vertexhandles.hh    | 18 ++++++------------
 2 files changed, 16 insertions(+), 22 deletions(-)

diff --git a/dumux/common/intersectionmapper.hh b/dumux/common/intersectionmapper.hh
index e320fb937d..96c1c3f3d3 100644
--- a/dumux/common/intersectionmapper.hh
+++ b/dumux/common/intersectionmapper.hh
@@ -51,7 +51,7 @@ class IntersectionMapper
     typedef typename GridView::IntersectionIterator IntersectionIterator;
     typedef typename GridView::Intersection Intersection;
     typedef Dune::MultipleCodimMultipleGeomTypeMapper<GridView,ElementLayout> ElementMapper;
-    typedef typename ElementMapper::Index ElementMapperIndex;
+
 
 
 public:
@@ -79,48 +79,48 @@ public:
         return elementMapper_;
     }
 
-    ElementMapperIndex map(const Element& element) const
+    auto map(const Element& element) const
     {
         return elementMapper_.map(element);
     }
 
-    ElementMapperIndex map(int elemIdx, int faceIdx)
+    auto map(int elemIdx, int faceIdx)
     {
         return intersectionMapGlobal_[elemIdx][faceIdx];
     }
 
-    ElementMapperIndex map(int elemIdx, int faceIdx) const
+    auto map(int elemIdx, int faceIdx) const
     {
         return (intersectionMapGlobal_[elemIdx].find(faceIdx))->second;//use find() for const function!
     }
 
-    ElementMapperIndex map(const Element& element, int faceIdx)
+    auto map(const Element& element, int faceIdx)
     {
         return intersectionMapGlobal_[map(element)][faceIdx];
     }
 
-    ElementMapperIndex map(const Element& element, int faceIdx) const
+    auto map(const Element& element, int faceIdx) const
     {
         return intersectionMapGlobal_[map(element)].find(faceIdx)->second;//use find() for const function!
     }
 
-    ElementMapperIndex maplocal(int elemIdx, int faceIdx)
+    auto maplocal(int elemIdx, int faceIdx)
     {
         return intersectionMapLocal_[elemIdx][faceIdx];
     }
 
-    ElementMapperIndex maplocal(int elemIdx, int faceIdx) const
+    auto maplocal(int elemIdx, int faceIdx) const
     {
         return (intersectionMapLocal_[elemIdx].find(faceIdx))->second;//use find() for const function!
     }
 
 
-    ElementMapperIndex maplocal(const Element& element, int faceIdx)
+    auto maplocal(const Element& element, int faceIdx)
     {
         return intersectionMapLocal_[map(element)][faceIdx];
     }
 
-    ElementMapperIndex maplocal(const Element& element, int faceIdx) const
+    auto maplocal(const Element& element, int faceIdx) const
     {
         return (intersectionMapLocal_[map(element)].find(faceIdx))->second;//use find() for const function!
     }
diff --git a/dumux/parallel/vertexhandles.hh b/dumux/parallel/vertexhandles.hh
index c4554f9584..02a571cece 100644
--- a/dumux/parallel/vertexhandles.hh
+++ b/dumux/parallel/vertexhandles.hh
@@ -38,8 +38,6 @@ class VertexHandleSum
     : public Dune::CommDataHandleIF< VertexHandleSum<FieldType, Container, VertexMapper>,
                                      FieldType >
 {
-    typedef typename VertexMapper::Index VertexMapperIndex;
-
 public:
     VertexHandleSum(Container &container,
                     const VertexMapper &mapper)
@@ -70,14 +68,14 @@ public:
     template<class MessageBufferImp, class EntityType>
     void gather(MessageBufferImp &buff, const EntityType &e) const
     {
-        VertexMapperIndex vIdx = mapper_.map(e);
+        auto vIdx = mapper_.map(e);
         buff.write(container_[vIdx]);
     }
 
     template<class MessageBufferImp, class EntityType>
     void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
     {
-        VertexMapperIndex vIdx = mapper_.map(e);
+        auto vIdx = mapper_.map(e);
 
         FieldType tmp;
         buff.read(tmp);
@@ -98,8 +96,6 @@ class VertexHandleMax
     : public Dune::CommDataHandleIF< VertexHandleMax<FieldType, Container, VertexMapper>,
                                      FieldType >
 {
-    typedef typename VertexMapper::Index VertexMapperIndex;
-
 public:
     VertexHandleMax(Container &container,
                     const VertexMapper &mapper)
@@ -130,14 +126,14 @@ public:
     template<class MessageBufferImp, class EntityType>
     void gather(MessageBufferImp &buff, const EntityType &e) const
     {
-        VertexMapperIndex vIdx = mapper_.map(e);
+        auto vIdx = mapper_.map(e);
         buff.write(container_[vIdx]);
     }
 
     template<class MessageBufferImp, class EntityType>
     void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
     {
-        VertexMapperIndex vIdx = mapper_.map(e);
+        auto vIdx = mapper_.map(e);
 
         FieldType tmp;
         buff.read(tmp);
@@ -159,8 +155,6 @@ class VertexHandleMin
     : public Dune::CommDataHandleIF< VertexHandleMin<FieldType, Container, VertexMapper>,
                                      FieldType >
 {
-    typedef typename VertexMapper::Index VertexMapperIndex;
-
 public:
     VertexHandleMin(Container &container,
                     const VertexMapper &mapper)
@@ -191,14 +185,14 @@ public:
     template<class MessageBufferImp, class EntityType>
     void gather(MessageBufferImp &buff, const EntityType &e) const
     {
-        VertexMapperIndex vIdx = mapper_.map(e);
+        auto vIdx = mapper_.map(e);
         buff.write(container_[vIdx]);
     }
 
     template<class MessageBufferImp, class EntityType>
     void scatter(MessageBufferImp &buff, const EntityType &e, size_t n)
     {
-        VertexMapperIndex vIdx = mapper_.map(e);
+        auto vIdx = mapper_.map(e);
 
         FieldType tmp;
         buff.read(tmp);
-- 
GitLab