Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
grid_tools_cache_update_flags.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2017 - 2019 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_grid_tria_info_cache_update_flags_h
17 #define dealii_grid_tria_info_cache_update_flags_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 DEAL_II_NAMESPACE_OPEN
23 
24 namespace GridTools
25 {
36  {
40  update_nothing = 0x000,
41 
47 
54 
60 
65 
70 
75 
85 
89  update_all = 0x0FF,
90  };
91 
92 
98  template <class StreamType>
99  inline StreamType &
100  operator<<(StreamType &s, const CacheUpdateFlags u)
101  {
102  s << " CacheUpdateFlags";
104  s << "|vertex_to_cell_map";
106  s << "|vertex_to_cells_centers_directions";
107  if (u & update_covering_rtree)
108  s << "|covering_rtree";
109 #ifdef DEAL_II_WITH_NANOFLANN
110  if (u & update_vertex_kdtree)
111  s << "|vertex_kdtree";
112 #endif
113  return s;
114  }
115 
116 
126  inline CacheUpdateFlags
128  {
129  return static_cast<CacheUpdateFlags>(static_cast<unsigned int>(f1) |
130  static_cast<unsigned int>(f2));
131  }
132 
142  inline CacheUpdateFlags
144  {
145  return static_cast<CacheUpdateFlags>(static_cast<unsigned int>(f1) ^
146  static_cast<unsigned int>(update_all));
147  }
148 
149 
150 
157  inline CacheUpdateFlags &
159  {
160  f1 = f1 | f2;
161  return f1;
162  }
163 
164 
175  const CacheUpdateFlags f2)
176  {
177  return static_cast<CacheUpdateFlags>(static_cast<unsigned int>(f1) &
178  static_cast<unsigned int>(f2));
179  }
180 
181 
188  inline CacheUpdateFlags &
190  {
191  f1 = f1 & f2;
192  return f1;
193  }
194 
195 } // namespace GridTools
196 DEAL_II_NAMESPACE_CLOSE
197 
198 #endif
StreamType & operator<<(StreamType &s, const CacheUpdateFlags u)
Definition: tria.h:81
CacheUpdateFlags & operator &=(CacheUpdateFlags &f1, const CacheUpdateFlags f2)
CacheUpdateFlags operator &(const CacheUpdateFlags f1, const CacheUpdateFlags f2)
CacheUpdateFlags & operator|=(CacheUpdateFlags &f1, const CacheUpdateFlags f2)
CacheUpdateFlags operator|(const CacheUpdateFlags f1, const CacheUpdateFlags f2)
CacheUpdateFlags operator~(const CacheUpdateFlags f1)