]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Instead of giving -1, let index() for vertex iterators return the global index of...
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 13 Nov 2010 00:56:20 +0000 (00:56 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sat, 13 Nov 2010 00:56:20 +0000 (00:56 +0000)
git-svn-id: https://svn.dealii.org/trunk@22714 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/grid/tria_accessor.h
deal.II/include/deal.II/grid/tria_accessor.templates.h
tests/deal.II/dof_accessor_01/cmp/generic

index 444d9ed428aeda7fc727966b2a1af07b3b1f994d..829bc179fe7ce527618fa5c34ea73334471ba194 100644 (file)
@@ -122,6 +122,7 @@ namespace internal
 }
 template <int structdim, int dim, int spacedim>        class TriaAccessor;
 template <int dim, int spacedim>               class TriaAccessor<0, dim, spacedim>;
+template <int spacedim>                                class TriaAccessor<0, 1, spacedim>;
 
 // note: the file tria_accessor.templates.h is included at the end of
 // this file.  this includes a lot of templates. originally, this was
@@ -1744,11 +1745,11 @@ class TriaAccessor<0, 1, spacedim>
     static int level ();
 
                                     /**
-                                     * Index of this object. Vertices
-                                     * have no index, so this
-                                     * function always returns -1.
+                                     * Index of this object. Returns
+                                     * the global index of the vertex
+                                     * this object points to.
                                      */
-    static int index ();
+    int index () const;
 
                                     /**
                                      * @name Advancement of iterators
index 6258e1d2cc5ebf7e1cda2a6a99d3a3c6e8b8599a..21455826f1b0db98e220a6e2c292cd356d39f9e9 100644 (file)
@@ -2057,9 +2057,9 @@ TriaAccessor<0, 1, spacedim>::level ()
 template <int spacedim>
 inline
 int
-TriaAccessor<0, 1, spacedim>::index ()
+TriaAccessor<0, 1, spacedim>::index () const
 {
-  return -1;
+  return global_vertex_index;
 }
 
 
index 0c55aa31de5acb479f18a6776ed25badba8aeca8..5bfd19ba7fe173b71bd8a99af66dcd8b526cd1ce 100644 (file)
@@ -1,4 +1,4 @@
 
-DEAL::-1 -1
+DEAL::3 3
 DEAL::40 40
 DEAL::281 281

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.