Reference documentation for deal.II version 9.2.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
grid_tools_cache_update_flags.h
Go to the documentation of this file.
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 
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
197 
198 #endif
StreamType & operator<<(StreamType &s, const CacheUpdateFlags u)
CacheUpdateFlags & operator &=(CacheUpdateFlags &f1, const CacheUpdateFlags f2)
CacheUpdateFlags operator &(const CacheUpdateFlags f1, const CacheUpdateFlags f2)
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
CacheUpdateFlags & operator|=(CacheUpdateFlags &f1, const CacheUpdateFlags f2)
CacheUpdateFlags operator|(const CacheUpdateFlags f1, const CacheUpdateFlags f2)
CacheUpdateFlags operator~(const CacheUpdateFlags f1)
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358