]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix compiling python-bindings 9058/head
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 19 Nov 2019 14:43:45 +0000 (09:43 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Tue, 19 Nov 2019 16:34:35 +0000 (11:34 -0500)
contrib/python-bindings/include/cell_accessor_wrapper.h

index 159349691ae4887448996ab62768a13e091967ec..79e0f481bfd1dc4a764fc78e7879c8d3a8920f1b 100644 (file)
@@ -172,7 +172,7 @@ namespace python
                    << "acceptable is " << arg2 - 1);
 
   private:
-    template <int dim, int spacedim>
+    template <int dim_, int spacedim_>
     const CellAccessorWrapper
     construct_neighbor_wrapper(const int i) const;
 
@@ -193,22 +193,22 @@ namespace python
   };
 
 
-  template <int dim, int spacedim>
+  template <int dim_, int spacedim_>
   const CellAccessorWrapper
   CellAccessorWrapper::construct_neighbor_wrapper(const int i) const
   {
-    CellAccessor<dim, spacedim> *cell =
-      static_cast<CellAccessor<dim, spacedim> *>(cell_accessor);
+    Assert(dim_ == dim && spacedim_ == spacedim, ExcInternalError());
+    auto *cell = static_cast<CellAccessor<dim_, spacedim_> *>(cell_accessor);
 
     auto neighbor = cell->neighbor(i);
 
     CellAccessorWrapper neighbor_wrapper;
-    neighbor_wrapper.dim      = dim;
-    neighbor_wrapper.spacedim = spacedim;
+    neighbor_wrapper.dim      = dim_;
+    neighbor_wrapper.spacedim = spacedim_;
     neighbor_wrapper.cell_accessor =
-      new CellAccessor<dim, spacedim>(&neighbor->get_triangulation(),
-                                      neighbor->level(),
-                                      neighbor->index());
+      new CellAccessor<dim_, spacedim_>(&neighbor->get_triangulation(),
+                                        neighbor->level(),
+                                        neighbor->index());
     return neighbor_wrapper;
   }
 } // namespace python

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.