]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Renamed GridTools::CacheFlags -> GridTools::CacheUpdateFlags
authorLuca Heltai <luca.heltai@sissa.it>
Tue, 19 Sep 2017 07:54:45 +0000 (09:54 +0200)
committerLuca Heltai <luca.heltai@sissa.it>
Tue, 19 Sep 2017 07:54:45 +0000 (09:54 +0200)
include/deal.II/grid/grid_tools_cache.h
include/deal.II/grid/grid_tools_cache_update_flags.h [moved from include/deal.II/grid/grid_tools_cache_flags.h with 77% similarity]
source/grid/grid_tools_cache.cc

index c527355b428a106f5ba7dea92656101c3a241e5d..dbf2afd2290be0d9d09362c9649223e84d306dcf 100644 (file)
@@ -25,7 +25,7 @@
 #include <deal.II/grid/tria.h>
 #include <deal.II/grid/tria_iterator.h>
 #include <deal.II/grid/tria_accessor.h>
-#include <deal.II/grid/grid_tools_cache_flags.h>
+#include <deal.II/grid/grid_tools_cache_update_flags.h>
 #include <deal.II/fe/mapping_q1.h>
 
 #include <deal.II/numerics/kdtree.h>
@@ -90,7 +90,7 @@ namespace GridTools
      *
      * @param flags What to mark for update
      */
-    void mark_for_update(const CacheFlags &flags=update_all);
+    void mark_for_update(const CacheUpdateFlags &flags=update_all);
 
 
     /**
@@ -118,7 +118,7 @@ namespace GridTools
     /**
      * Keep track of what needs to be updated next.
      */
-    mutable CacheFlags update_flags;
+    mutable CacheUpdateFlags update_flags;
 
     /**
      * A pointer to the Triangulation.
similarity index 77%
rename from include/deal.II/grid/grid_tools_cache_flags.h
rename to include/deal.II/grid/grid_tools_cache_update_flags.h
index d3f6880ca62ed7baa73165180747e85c561585b0..dc698ae8cfc0a8d6727abc4957c642371f256038 100644 (file)
@@ -13,8 +13,8 @@
 //
 // ---------------------------------------------------------------------
 
-#ifndef dealii_grid_tria_info_cache_flags_h
-#define dealii_grid_tria_info_cache_flags_h
+#ifndef dealii_grid_tria_info_cache_update_flags_h
+#define dealii_grid_tria_info_cache_update_flags_h
 
 
 #include <deal.II/base/config.h>
@@ -29,11 +29,11 @@ namespace GridTools
    * information to update.
    *
    * You can select more than one flag by concatenation using the bitwise or
-   * <code>operator|(CacheFlags,CacheFlags)</code>.
+   * <code>operator|(CacheUpdateFlags,CacheUpdateFlags)</code>.
    *
    * @author Luca Heltai, 2017.
    */
-  enum CacheFlags
+  enum CacheUpdateFlags
   {
     /**
      * Update Nothing.
@@ -68,13 +68,13 @@ namespace GridTools
   /**
    * Output operator which outputs assemble flags as a set of or'd text values.
    *
-   * @ref CacheFlags
+   * @ref CacheUpdateFlags
    */
   template <class StreamType>
   inline
-  StreamType &operator << (StreamType &s, CacheFlags u)
+  StreamType &operator << (StreamType &s, CacheUpdateFlags u)
   {
-    s << " CacheFlags";
+    s << " CacheUpdateFlags";
     if (u & update_vertex_to_cell_map)                 s << "|vertex_to_cell_map";
     if (u & update_vertex_to_cell_centers_directions)  s << "|vertex_to_cells_centers_directions";
 #ifdef DEAL_II_WITH_NANOFLANN
@@ -89,15 +89,15 @@ namespace GridTools
    * either set in the first or the second argument. This operator exists since
    * if it did not then the result of the bit-or <tt>operator |</tt> would be an
    * integer which would in turn trigger a compiler warning when we tried to
-   * assign it to an object of type CacheFlags.
+   * assign it to an object of type CacheUpdateFlags.
    *
-   * @ref CacheFlags
+   * @ref CacheUpdateFlags
    */
   inline
-  CacheFlags
-  operator | (CacheFlags f1, CacheFlags f2)
+  CacheUpdateFlags
+  operator | (CacheUpdateFlags f1, CacheUpdateFlags f2)
   {
-    return static_cast<CacheFlags> (
+    return static_cast<CacheUpdateFlags> (
              static_cast<unsigned int> (f1) |
              static_cast<unsigned int> (f2));
   }
@@ -107,15 +107,15 @@ namespace GridTools
    * not set in the argument. This operator exists since
    * if it did not then the result of the bit-negation <tt>operator ~</tt> would be an
    * integer which would in turn trigger a compiler warning when we tried to
-   * assign it to an object of type CacheFlags.
+   * assign it to an object of type CacheUpdateFlags.
    *
-   * @ref CacheFlags
+   * @ref CacheUpdateFlags
    */
   inline
-  CacheFlags
-  operator ~ (CacheFlags f1)
+  CacheUpdateFlags
+  operator ~ (CacheUpdateFlags f1)
   {
-    return static_cast<CacheFlags> (
+    return static_cast<CacheUpdateFlags> (
              ~static_cast<unsigned int> (f1)
            );
   }
@@ -126,11 +126,11 @@ namespace GridTools
    * Global operator which sets the bits from the second argument also in the
    * first one.
    *
-   * @ref CacheFlags
+   * @ref CacheUpdateFlags
    */
   inline
-  CacheFlags &
-  operator |= (CacheFlags &f1, CacheFlags f2)
+  CacheUpdateFlags &
+  operator |= (CacheUpdateFlags &f1, CacheUpdateFlags f2)
   {
     f1 = f1 | f2;
     return f1;
@@ -142,15 +142,15 @@ namespace GridTools
    * set in the first as well as the second argument. This operator exists since
    * if it did not then the result of the bit-and <tt>operator &</tt> would be
    * an integer which would in turn trigger a compiler warning when we tried to
-   * assign it to an object of type CacheFlags.
+   * assign it to an object of type CacheUpdateFlags.
    *
-   * @ref CacheFlags
+   * @ref CacheUpdateFlags
    */
   inline
-  CacheFlags
-  operator & (CacheFlags f1, CacheFlags f2)
+  CacheUpdateFlags
+  operator & (CacheUpdateFlags f1, CacheUpdateFlags f2)
   {
-    return static_cast<CacheFlags> (
+    return static_cast<CacheUpdateFlags> (
              static_cast<unsigned int> (f1) &
              static_cast<unsigned int> (f2));
   }
@@ -160,11 +160,11 @@ namespace GridTools
    * Global operator which clears all the bits in the first argument if they are
    * not also set in the second argument.
    *
-   * @ref CacheFlags
+   * @ref CacheUpdateFlags
    */
   inline
-  CacheFlags &
-  operator &= (CacheFlags &f1, CacheFlags f2)
+  CacheUpdateFlags &
+  operator &= (CacheUpdateFlags &f1, CacheUpdateFlags f2)
   {
     f1 = f1 & f2;
     return f1;
index e1cba45da28fa1b1eb77228ea68cffa092ad6974..3aedd473ef4fe15a9ce19d5329e1e1a75c7f7d4b 100644 (file)
@@ -47,7 +47,7 @@ namespace GridTools
 
 
   template<int dim, int spacedim>
-  void Cache<dim,spacedim>::mark_for_update(const CacheFlags &flags)
+  void Cache<dim,spacedim>::mark_for_update(const CacheUpdateFlags &flags)
   {
     update_flags |= flags;
   }

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.