]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Don't use a stack any more, but rather a vector, as sometimes we need
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 29 Sep 2000 15:17:41 +0000 (15:17 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 29 Sep 2000 15:17:41 +0000 (15:17 +0000)
random access.

git-svn-id: https://svn.dealii.org/trunk@3361 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/grid_reordering.h

index 847af33e97bd69ef4d1b00edeb841477b95275ae..02dad5b89cf163d44f05916263c3585d6470d5dc 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <map>
 #include <vector>
-#include <stack>
 #include <grid/tria.h>
 
 
@@ -110,6 +109,20 @@ class GridReordering : private GridReorderingInfo<dim>
     class Cell;
     class Face;
     class FaceData;
+
+                                    /**
+                                     * Typedef for a stack type that
+                                     * describes the rotational
+                                     * states of all cells that have
+                                     * already been fitted into the
+                                     * grid. It is mostly used like a
+                                     * stack, but sometimes we need
+                                     * random access into values
+                                     * below the top, so we can't use
+                                     * the @p{stack} adaptor from
+                                     * STL.
+                                     */
+    typedef vector<unsigned int> RotationStack;
     
                                     /**
                                      * Class that describes the
@@ -402,10 +415,13 @@ class GridReordering : private GridReorderingInfo<dim>
                                      * as recursive calls but rather
                                      * as eliminated tail-recursion.
                                      */
-    static void track_back (vector<Cell>                               &cells,
-                           stack<unsigned int, vector<unsigned int> > &rotation_states,
-                           unsigned int                                track_back_to_cell);
+    static void track_back (vector<Cell>  &cells,
+                           RotationStack &rotation_states,
+                           unsigned int   track_back_to_cell);
 
+    static bool try_rotate_single_neighbors (vector<Cell>  &cells,
+                                            RotationStack &rotation_states);
+    
                                     /**
                                      * This is the main function that
                                      * does the main work. It is

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.