]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Triangulation::clear_user_flags_XXX
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 26 Apr 2006 04:19:34 +0000 (04:19 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Wed, 26 Apr 2006 04:19:34 +0000 (04:19 +0000)
git-svn-id: https://svn.dealii.org/trunk@12905 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria.h
deal.II/deal.II/source/grid/tria.cc
deal.II/doc/news/changes.html

index 798d4c298323d3ec869224716ccdabc83d0835d5..594f47cc75790b05f9ab068ecc236df561c25947 100644 (file)
@@ -1753,7 +1753,12 @@ class Triangulation : public Subscriptor
                                      */
     void load_user_flags (const std::vector<bool> &v);
 
-                                    /**
+                                    /**
+                                     *  Clear all user flags on lines.
+                                     */
+    void clear_user_flags_line ();
+
+                                    /**
                                      * Save the user flags on lines.
                                      */
     void save_user_flags_line (std::ostream &out) const;
@@ -1776,6 +1781,11 @@ class Triangulation : public Subscriptor
                                      */
     void load_user_flags_line (const std::vector<bool> &v);
 
+                                    /**
+                                     *  Clear all user flags on quads.
+                                     */
+    void clear_user_flags_quad ();
+
                                     /**
                                      * Save the user flags on quads.
                                      */
@@ -1799,7 +1809,13 @@ class Triangulation : public Subscriptor
                                      */
     void load_user_flags_quad (const std::vector<bool> &v);
 
-                                    /**
+
+                                    /**
+                                     *  Clear all user flags on quads.
+                                     */
+    void clear_user_flags_hex ();
+
+                                    /**
                                      * Save the user flags on hexs.
                                      */
     void save_user_flags_hex (std::ostream &out) const;
@@ -3155,14 +3171,17 @@ template <> void Triangulation<2>::clear_user_pointers ();
 template <> void Triangulation<2>::clear_user_flags ();
 template <> void Triangulation<3>::clear_user_pointers ();
 template <> void Triangulation<3>::clear_user_flags ();
+template <> void Triangulation<1>::clear_user_flags_quad ();
 template <> void Triangulation<1>::save_user_flags_quad (std::ostream &) const;
 template <> void Triangulation<1>::save_user_flags_quad (std::vector<bool> &) const;
 template <> void Triangulation<1>::load_user_flags_quad (std::istream &);
 template <> void Triangulation<1>::load_user_flags_quad (const std::vector<bool> &);
+template <> void Triangulation<1>::clear_user_flags_hex ();
 template <> void Triangulation<1>::save_user_flags_hex (std::ostream &) const;
 template <> void Triangulation<1>::save_user_flags_hex (std::vector<bool> &) const;
 template <> void Triangulation<1>::load_user_flags_hex (std::istream &);
 template <> void Triangulation<1>::load_user_flags_hex (const std::vector<bool> &);
+template <> void Triangulation<2>::clear_user_flags_hex ();
 template <> void Triangulation<2>::save_user_flags_hex (std::ostream &) const;
 template <> void Triangulation<2>::save_user_flags_hex (std::vector<bool> &) const;
 template <> void Triangulation<2>::load_user_flags_hex (std::istream &);
index 39e8a86b0d7bd694f9b650d103c3112d6e0d18ed..7f390da2bc2c7c16167caa962cb7ee628a06e3f6 100644 (file)
@@ -1980,12 +1980,21 @@ void Triangulation<1>::clear_user_pointers ()
 template <>
 void Triangulation<1>::clear_user_flags ()
 {
-  cell_iterator cell = begin(),
-               endc = end();
-  for (; cell!=endc; ++cell)
-    cell->clear_user_flag ();
+  clear_user_flags_line();
 }
 
+
+
+template <>
+void Triangulation<1>::clear_user_flags_quad ()
+{}
+
+
+template <>
+void Triangulation<1>::clear_user_flags_hex ()
+{}
+
+
 #endif
 
 
@@ -2010,18 +2019,17 @@ void Triangulation<2>::clear_user_pointers ()
 template <>
 void Triangulation<2>::clear_user_flags ()
 {
-  line_iterator line = begin_line(),
-               endl = end_line();
-  for (; line!=endl; ++line)
-    line->clear_user_flag ();
-
-  cell_iterator cell = begin(),
-               endc = end();
-  for (; cell!=endc; ++cell)
-    cell->clear_user_flag ();
+  clear_user_flags_line ();
+  clear_user_flags_quad ();  
 }
 
 
+
+template <>
+void Triangulation<2>::clear_user_flags_hex ()
+{}
+
+
 #endif
 
 
@@ -2050,25 +2058,48 @@ void Triangulation<3>::clear_user_pointers ()
 
 template <>
 void Triangulation<3>::clear_user_flags ()
+{
+  clear_user_flags_line ();
+  clear_user_flags_quad ();
+  clear_user_flags_hex ();
+}
+
+
+
+#endif
+
+
+template <int dim>
+void Triangulation<dim>::clear_user_flags_line ()
 {
   line_iterator line = begin_line(),
                endl = end_line();
   for (; line!=endl; ++line)
     line->clear_user_flag ();
+}
+
+
 
+template <int dim>
+void Triangulation<dim>::clear_user_flags_quad ()
+{
   quad_iterator quad = begin_quad(),
                endq = end_quad();
   for (; quad!=endq; ++quad)
     quad->clear_user_flag ();
-
-  cell_iterator cell = begin(),
-               endc = end();
-  for (; cell!=endc; ++cell)
-    cell->clear_user_flag ();
 }
 
 
-#endif
+
+template <int dim>
+void Triangulation<dim>::clear_user_flags_hex ()
+{
+  hex_iterator hex  = begin_hex(),
+               endh = end_hex();
+  for (; hex!=endh; ++hex)
+    hex->clear_user_flag ();
+}
+
 
 
 template <int dim>
index f4d04976575158e01f930ffc02c173f253ca3885..2c9cb90c7c4845b49ded1f1c55124e9575947898 100644 (file)
@@ -612,6 +612,15 @@ inconvenience this causes.
 <h3>deal.II</h3>
 
 <ol>
+  <li> <p>
+       New: The functions <code>Triangulation::clear_user_flags_line</code>,
+       <code>Triangulation::clear_user_flags_quad</code>, and
+       <code>Triangulation::clear_user_flags_hex</code> can be used to
+       selectively clear only some of the user flags as needed.
+       <br> 
+       (WB 2006/04/25)
+       </p>
+
   <li> <p>
        New: The function <code>VectorTools::project</code> functions can now
        also be used for vector arguments of type other than

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.