]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add a way to get the number of existing vertices, used or not.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 29 Jun 1999 06:51:38 +0000 (06:51 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 29 Jun 1999 06:51:38 +0000 (06:51 +0000)
git-svn-id: https://svn.dealii.org/trunk@1496 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/source/grid/tria.cc

index 443edb590350a194871acc57d7592dc659b48aca..22be019c595039728ee6bcd7c4f407bf104eb440 100644 (file)
@@ -2727,6 +2727,19 @@ class Triangulation
                                      */
     unsigned int n_levels () const;
 
+                                    /**
+                                     * Return the total number of vertices.
+                                     * Some of them may not be used, which
+                                     * usually happens upon coarsening of
+                                     * a triangulation when some vertices are
+                                     * discarded, but we do not want to
+                                     * renumber the remaining one, leading to
+                                     * holes in the numbers of used vertices.
+                                     * You can get the number of used vertices
+                                     * using #n_used_vertices# function.
+                                     */
+    unsigned int n_vertices () const;
+    
                                     /**
                                      * Return the number of vertices that are
                                      * presently in use, i.e. belong to at least
index eb26357849c8e84facfdda88d9da274fade71136..8fa9399927947acc6b5de67e6ac0ec43fe041022 100644 (file)
@@ -3376,6 +3376,15 @@ unsigned int Triangulation<dim>::n_levels () const {
 
 
 
+template <int dim>
+unsigned int
+Triangulation<dim>::n_vertices () const 
+{
+  return vertices.size();
+};
+
+
+
 template <int dim>
 unsigned int
 Triangulation<dim>::n_used_vertices () const 

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.