]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a function previously forgotten to check in.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 7 Jan 2011 03:13:56 +0000 (03:13 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 7 Jan 2011 03:13:56 +0000 (03:13 +0000)
git-svn-id: https://svn.dealii.org/trunk@23149 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/grid/tria_accessor.h
deal.II/include/deal.II/grid/tria_accessor.templates.h

index 8acf9194c3a3e32596e31ec9ea231906045a2ff4..cb3b0e8148dec3b7bb5ed10856de48f0b6e6bf21 100644 (file)
@@ -1832,6 +1832,14 @@ class TriaAccessor<0, 1, spacedim>
                                      */
     Point<spacedim> & vertex (const unsigned int i = 0) const;
 
+                                    /**
+                                     * Return the center of this object,
+                                     * which of course co-incides with the
+                                     * location of the vertex this object
+                                     * refers to.
+                                     */
+    Point<spacedim> center () const;
+    
                                     /**
                                      * Pointer to the @p ith line
                                      * bounding this object. Will
index 952b8ea0db5647ddd52375cac9d8872cbc3fd4a0..eb003b6933692b0cf811c70be66d961c53d24797 100644 (file)
@@ -2143,6 +2143,17 @@ TriaAccessor<0, 1, spacedim>::vertex (const unsigned int i) const
 }
 
 
+
+template <int spacedim>
+inline
+Point<spacedim>
+TriaAccessor<0, 1, spacedim>::center () const
+{
+  return this->tria->vertices[global_vertex_index];
+}
+
+
+
 template <int spacedim>
 inline
 typename internal::Triangulation::Iterators<1,spacedim>::line_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.