From 25bbbe9366a55a753a95005b5724048a9c5a1244 Mon Sep 17 00:00:00 2001
From: Oliver Sander <sander@igpm.rwth-aachen.de>
Date: Sat, 25 Jul 2015 12:29:49 +0200
Subject: [PATCH] Don't mix up grid dimension and world dimension

Otherwise the code won't compile when the two dimensions differ.
---
 dune/solvers/common/permutationmanager.hh | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/dune/solvers/common/permutationmanager.hh b/dune/solvers/common/permutationmanager.hh
index 3505d0a7..df4d92de 100644
--- a/dune/solvers/common/permutationmanager.hh
+++ b/dune/solvers/common/permutationmanager.hh
@@ -168,15 +168,16 @@ public:
 #endif
 
   static const int dim = GridType::dimension;
+  static const int dimworld = GridType::dimensionworld;
 
   typedef typename GridViewType :: template Codim<dim> :: Iterator NodeIterator;
   typedef typename GridType :: template Codim<dim> :: Geometry NodeGeometry;
 
-  typedef Dune::FieldVector<double, dim> DomainPointType; // type of point in the domain
-  typedef Node< DomainPointType , dim > NodeType; // type of nodes
+  typedef Dune::FieldVector<double, dimworld> DomainPointType; // type of point in the domain
+  typedef Dune::FieldVector<typename GridType::ctype, dimworld> CoordinateType;
+  typedef Node< CoordinateType, dim > NodeType; // type of nodes
   typedef std::vector< NodeType > NodeListType; // array type list of nodes
 
-  typedef Dune::FieldVector<typename GridType::ctype, GridType::dimensionworld> CoordinateType;
 
     const GridViewType gridView_;
 
@@ -226,7 +227,7 @@ private:
        {
 
         const NodeGeometry& node_geometry = node->geometry();
-        DomainPointType global_coordinate_node = node_geometry.corner(0);
+        CoordinateType global_coordinate_node = node_geometry.corner(0);
 
         node_list_[idSet.index(*node)].set_node_index( idSet.index(*node) );
         node_list_[idSet.index(*node)].set_permuted_node_index( idSet.index(*node) );
-- 
GitLab