]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Simplify the decision which iterator class to use somewhat. My hope is that this...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Jun 2012 12:40:29 +0000 (12:40 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Jun 2012 12:40:29 +0000 (12:40 +0000)
git-svn-id: https://svn.dealii.org/trunk@25605 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/grid/tria.h
deal.II/include/deal.II/grid/tria_iterator_selector.h

index d9d6db3facfbf57323bf4457e5d2589773f40db5..61662fb679af8b39e60a4cac0a893ef92d6e362c 100644 (file)
@@ -1480,8 +1480,13 @@ class Triangulation : public Subscriptor
     };
 
 
-    typedef typename IteratorSelector::CellAccessor         cell_accessor;
-    typedef typename IteratorSelector::FaceAccessor         face_accessor;
+    typedef TriaRawIterator   <CellAccessor<dim,spacedim>         > raw_cell_iterator;
+    typedef TriaIterator      <CellAccessor<dim,spacedim>         > cell_iterator;
+    typedef TriaActiveIterator<CellAccessor<dim,spacedim>         > active_cell_iterator;
+
+    typedef TriaRawIterator   <TriaAccessor<dim-1, dim, spacedim> > raw_face_iterator;
+    typedef TriaIterator      <TriaAccessor<dim-1, dim, spacedim> > face_iterator;
+    typedef TriaActiveIterator<TriaAccessor<dim-1, dim, spacedim> > active_face_iterator;
 
     typedef typename IteratorSelector::raw_line_iterator    raw_line_iterator;
     typedef typename IteratorSelector::line_iterator        line_iterator;
@@ -1495,14 +1500,6 @@ class Triangulation : public Subscriptor
     typedef typename IteratorSelector::hex_iterator        hex_iterator;
     typedef typename IteratorSelector::active_hex_iterator active_hex_iterator;
 
-    typedef typename IteratorSelector::raw_cell_iterator    raw_cell_iterator;
-    typedef typename IteratorSelector::cell_iterator        cell_iterator;
-    typedef typename IteratorSelector::active_cell_iterator active_cell_iterator;
-
-    typedef typename IteratorSelector::raw_face_iterator    raw_face_iterator;
-    typedef typename IteratorSelector::face_iterator        face_iterator;
-    typedef typename IteratorSelector::active_face_iterator active_face_iterator;
-
                                      /**
                                       *  Base class for refinement listeners.
                                       *  Other classes, which need to be
index 98367a93697260c8fe0aba1a9524a4c3ed10d8a9..714b7f7ef51d4dfd58a07c7e0a83fe646d1f37ff 100644 (file)
@@ -65,29 +65,18 @@ namespace internal
     template <int spacedim>
     struct Iterators<1,spacedim>
     {
-        typedef dealii::CellAccessor<1,spacedim> CellAccessor;
-        typedef InvalidAccessor<0,1,spacedim> FaceAccessor;
+        typedef TriaRawIterator   <dealii::CellAccessor<1,spacedim> > raw_line_iterator;
+        typedef TriaIterator      <dealii::CellAccessor<1,spacedim> > line_iterator;
+        typedef TriaActiveIterator<dealii::CellAccessor<1,spacedim> > active_line_iterator;
 
-        typedef TriaRawIterator   <CellAccessor> raw_line_iterator;
-        typedef TriaIterator      <CellAccessor> line_iterator;
-        typedef TriaActiveIterator<CellAccessor> active_line_iterator;
+        typedef TriaRawIterator   <dealii::InvalidAccessor<2,1,spacedim> > raw_quad_iterator;
+        typedef TriaIterator      <dealii::InvalidAccessor<2,1,spacedim> > quad_iterator;
+        typedef TriaActiveIterator<dealii::InvalidAccessor<2,1,spacedim> > active_quad_iterator;
 
-        typedef TriaRawIterator   <InvalidAccessor<2,1,spacedim> > raw_quad_iterator;
-        typedef TriaIterator      <InvalidAccessor<2,1,spacedim> > quad_iterator;
-        typedef TriaActiveIterator<InvalidAccessor<2,1,spacedim> > active_quad_iterator;
-
-        typedef TriaRawIterator   <InvalidAccessor<3,1,spacedim> > raw_hex_iterator;
-        typedef TriaIterator      <InvalidAccessor<3,1,spacedim> > hex_iterator;
-        typedef TriaActiveIterator<InvalidAccessor<3,1,spacedim> > active_hex_iterator;
-
-        typedef raw_line_iterator    raw_cell_iterator;
-        typedef line_iterator        cell_iterator;
-        typedef active_line_iterator active_cell_iterator;
-
-        typedef TriaRawIterator   <FaceAccessor> raw_face_iterator;
-        typedef TriaIterator      <FaceAccessor> face_iterator;
-        typedef TriaActiveIterator<FaceAccessor> active_face_iterator;
-    };
+        typedef TriaRawIterator   <dealii::InvalidAccessor<3,1,spacedim> > raw_hex_iterator;
+        typedef TriaIterator      <dealii::InvalidAccessor<3,1,spacedim> > hex_iterator;
+        typedef TriaActiveIterator<dealii::InvalidAccessor<3,1,spacedim> > active_hex_iterator;
+   };
 
 
 
@@ -129,28 +118,17 @@ namespace internal
     template <int spacedim>
     struct Iterators<2,spacedim>
     {
-        typedef dealii::CellAccessor<2, spacedim> CellAccessor;
-        typedef dealii::TriaAccessor<1, 2, spacedim> FaceAccessor;
-
-        typedef TriaRawIterator   <FaceAccessor> raw_line_iterator;
-        typedef TriaIterator      <FaceAccessor> line_iterator;
-        typedef TriaActiveIterator<FaceAccessor> active_line_iterator;
+        typedef TriaRawIterator   <dealii::TriaAccessor<1, 2, spacedim> > raw_line_iterator;
+        typedef TriaIterator      <dealii::TriaAccessor<1, 2, spacedim> > line_iterator;
+        typedef TriaActiveIterator<dealii::TriaAccessor<1, 2, spacedim> > active_line_iterator;
 
-        typedef TriaRawIterator   <CellAccessor> raw_quad_iterator;
-        typedef TriaIterator      <CellAccessor> quad_iterator;
-        typedef TriaActiveIterator<CellAccessor> active_quad_iterator;
+        typedef TriaRawIterator   <dealii::CellAccessor<2, spacedim> > raw_quad_iterator;
+        typedef TriaIterator      <dealii::CellAccessor<2, spacedim> > quad_iterator;
+        typedef TriaActiveIterator<dealii::CellAccessor<2, spacedim> > active_quad_iterator;
 
-        typedef TriaRawIterator   <InvalidAccessor<3,2,spacedim> > raw_hex_iterator;
-        typedef TriaIterator      <InvalidAccessor<3,2,spacedim> > hex_iterator;
-        typedef TriaActiveIterator<InvalidAccessor<3,2,spacedim> > active_hex_iterator;
-
-        typedef raw_quad_iterator    raw_cell_iterator;
-        typedef quad_iterator        cell_iterator;
-        typedef active_quad_iterator active_cell_iterator;
-
-        typedef raw_line_iterator    raw_face_iterator;
-        typedef line_iterator        face_iterator;
-        typedef active_line_iterator active_face_iterator;
+        typedef TriaRawIterator   <dealii::InvalidAccessor<3,2,spacedim> > raw_hex_iterator;
+        typedef TriaIterator      <dealii::InvalidAccessor<3,2,spacedim> > hex_iterator;
+        typedef TriaActiveIterator<dealii::InvalidAccessor<3,2,spacedim> > active_hex_iterator;
     };
 
 
@@ -177,28 +155,17 @@ namespace internal
     template <int spacedim>
     struct Iterators<3,spacedim>
     {
-        typedef dealii::CellAccessor<3, spacedim> CellAccessor;
-        typedef dealii::TriaAccessor<2, 3, spacedim> FaceAccessor;
-
         typedef TriaRawIterator   <dealii::TriaAccessor<1, 3, spacedim> > raw_line_iterator;
         typedef TriaIterator      <dealii::TriaAccessor<1, 3, spacedim> > line_iterator;
         typedef TriaActiveIterator<dealii::TriaAccessor<1, 3, spacedim> > active_line_iterator;
 
-        typedef TriaRawIterator   <FaceAccessor> raw_quad_iterator;
-        typedef TriaIterator      <FaceAccessor> quad_iterator;
-        typedef TriaActiveIterator<FaceAccessor> active_quad_iterator;
-
-        typedef TriaRawIterator   <CellAccessor> raw_hex_iterator;
-        typedef TriaIterator      <CellAccessor> hex_iterator;
-        typedef TriaActiveIterator<CellAccessor> active_hex_iterator;
-
-        typedef raw_hex_iterator    raw_cell_iterator;
-        typedef hex_iterator        cell_iterator;
-        typedef active_hex_iterator active_cell_iterator;
+        typedef TriaRawIterator   <dealii::TriaAccessor<2, 3, spacedim> > raw_quad_iterator;
+        typedef TriaIterator      <dealii::TriaAccessor<2, 3, spacedim> > quad_iterator;
+        typedef TriaActiveIterator<dealii::TriaAccessor<2, 3, spacedim> > active_quad_iterator;
 
-        typedef raw_quad_iterator    raw_face_iterator;
-        typedef quad_iterator        face_iterator;
-        typedef active_quad_iterator active_face_iterator;
+        typedef TriaRawIterator   <dealii::CellAccessor<3, spacedim> > raw_hex_iterator;
+        typedef TriaIterator      <dealii::CellAccessor<3, spacedim> > hex_iterator;
+        typedef TriaActiveIterator<dealii::CellAccessor<3, spacedim> > active_hex_iterator;
     };
 
   }

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.