deal.II version GIT relicensing-2167-g9622207b8f 2024-11-21 12:40:00+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
grid_tools_cache_update_flags.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2017 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_grid_tria_info_cache_update_flags_h
16#define dealii_grid_tria_info_cache_update_flags_h
17
18
19#include <deal.II/base/config.h>
20
22
23namespace GridTools
24{
97
98
104 template <typename StreamType>
105 inline StreamType &
106 operator<<(StreamType &s, const CacheUpdateFlags u)
107 {
108 s << " CacheUpdateFlags";
110 s << "|vertex_to_cell_map";
112 s << "|vertex_to_cells_centers_directions";
113 if (u & update_covering_rtree)
114 s << "|covering_rtree";
115 return s;
116 }
117
118
128 inline CacheUpdateFlags
130 {
131 return static_cast<CacheUpdateFlags>(static_cast<unsigned int>(f1) |
132 static_cast<unsigned int>(f2));
133 }
134
144 inline CacheUpdateFlags
146 {
147 return static_cast<CacheUpdateFlags>(static_cast<unsigned int>(f1) ^
148 static_cast<unsigned int>(update_all));
149 }
150
151
152
159 inline CacheUpdateFlags &
161 {
162 f1 = f1 | f2;
163 return f1;
164 }
165
166
176 inline CacheUpdateFlags
178 {
179 return static_cast<CacheUpdateFlags>(static_cast<unsigned int>(f1) &
180 static_cast<unsigned int>(f2));
181 }
182
183
190 inline CacheUpdateFlags &
192 {
193 f1 = f1 & f2;
194 return f1;
195 }
196
197} // namespace GridTools
199
200#endif
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
CacheUpdateFlags & operator|=(CacheUpdateFlags &f1, const CacheUpdateFlags f2)
CacheUpdateFlags operator|(const CacheUpdateFlags f1, const CacheUpdateFlags f2)
CacheUpdateFlags operator&(const CacheUpdateFlags f1, const CacheUpdateFlags f2)
CacheUpdateFlags operator~(const CacheUpdateFlags f1)
StreamType & operator<<(StreamType &s, const CacheUpdateFlags u)
CacheUpdateFlags & operator&=(CacheUpdateFlags &f1, const CacheUpdateFlags f2)