From 0606baf4aa8e09146569ec9895083db144d5baa4 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Tue, 19 Sep 2017 09:54:45 +0200 Subject: [PATCH] Renamed GridTools::CacheFlags -> GridTools::CacheUpdateFlags --- include/deal.II/grid/grid_tools_cache.h | 6 +- ...lags.h => grid_tools_cache_update_flags.h} | 56 +++++++++---------- source/grid/grid_tools_cache.cc | 2 +- 3 files changed, 32 insertions(+), 32 deletions(-) rename include/deal.II/grid/{grid_tools_cache_flags.h => grid_tools_cache_update_flags.h} (77%) diff --git a/include/deal.II/grid/grid_tools_cache.h b/include/deal.II/grid/grid_tools_cache.h index c527355b42..dbf2afd229 100644 --- a/include/deal.II/grid/grid_tools_cache.h +++ b/include/deal.II/grid/grid_tools_cache.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -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. diff --git a/include/deal.II/grid/grid_tools_cache_flags.h b/include/deal.II/grid/grid_tools_cache_update_flags.h 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 d3f6880ca6..dc698ae8cf 100644 --- a/include/deal.II/grid/grid_tools_cache_flags.h +++ b/include/deal.II/grid/grid_tools_cache_update_flags.h @@ -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 @@ -29,11 +29,11 @@ namespace GridTools * information to update. * * You can select more than one flag by concatenation using the bitwise or - * operator|(CacheFlags,CacheFlags). + * operator|(CacheUpdateFlags,CacheUpdateFlags). * * @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 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 operator | 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 ( + return static_cast ( static_cast (f1) | static_cast (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 operator ~ 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 ( + return static_cast ( ~static_cast (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 operator & 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 ( + return static_cast ( static_cast (f1) & static_cast (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; diff --git a/source/grid/grid_tools_cache.cc b/source/grid/grid_tools_cache.cc index e1cba45da2..3aedd473ef 100644 --- a/source/grid/grid_tools_cache.cc +++ b/source/grid/grid_tools_cache.cc @@ -47,7 +47,7 @@ namespace GridTools template - void Cache::mark_for_update(const CacheFlags &flags) + void Cache::mark_for_update(const CacheUpdateFlags &flags) { update_flags |= flags; } -- 2.39.5