]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Add clear_user_pointers to Triangulation
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Nov 1998 00:17:25 +0000 (00:17 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Nov 1998 00:17:25 +0000 (00:17 +0000)
git-svn-id: https://svn.dealii.org/trunk@666 0785d39b-7218-0410-832d-ea1e28bc413d

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

index e2a9315de497e3ffe7f8c7df0147944ef4378297..b08baa758bd0c15d37b619c7b7a51ae4a29f97da 100644 (file)
@@ -1576,6 +1576,11 @@ class Triangulation : public TriaDimensionInfo<dim>, public Subscriptor {
                                      */
                                     /*@{*/
                                     /**
+                                     *  Clear all user pointers.
+                                     */
+    void clear_user_pointers ();
+
+                                    /**
                                      *  Clear all user flags.
                                      */
     void clear_user_flags ();
index c63802c16e8c0a0b50503f02f5ba1f9e8f05d5b3..0b336ebe532461b2ffeadcfff275cd51e94b057f 100644 (file)
@@ -947,6 +947,16 @@ void Triangulation<dim>::load_coarsen_flags (const vector<bool> &v) {
 
 #if deal_II_dimension == 1
 
+template <>
+void Triangulation<1>::clear_user_pointers () {
+  cell_iterator cell = begin(),
+               endc = end();
+  for (; cell!=endc; ++cell)
+    cell->clear_user_pointer ();
+};
+
+
+
 template <>
 void Triangulation<1>::clear_user_flags () {
   cell_iterator cell = begin(),
@@ -974,6 +984,21 @@ void Triangulation<1>::save_user_flags (vector<bool> &v) const {
 
 #if deal_II_dimension == 2
 
+template <>
+void Triangulation<2>::clear_user_pointers () {
+  line_iterator line = begin_line(),
+               endl = end_line();
+  for (; line!=endl; ++line)
+    line->clear_user_pointer ();
+
+  cell_iterator cell = begin(),
+               endc = end();
+  for (; cell!=endc; ++cell)
+    cell->clear_user_pointer ();
+};
+
+
+
 template <>
 void Triangulation<2>::clear_user_flags () {
   line_iterator line = begin_line(),

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.