Reference documentation for deal.II version 9.1.0-pre
assemble_flags.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2017 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_mesh_worker_assemble_flags_h
17 #define dealii_mesh_worker_assemble_flags_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #include <vector>
23 
24 
25 DEAL_II_NAMESPACE_OPEN
26 
29 
30 namespace MeshWorker
31 {
42  {
82 
88 
93 
100 
106  };
107 
108 
114  template <class StreamType>
115  inline StreamType &
116  operator<<(StreamType &s, AssembleFlags u)
117  {
118  s << " AssembleFlags";
119  if (u & assemble_own_cells)
120  s << "|own_cells";
122  s << "|own_faces_once";
124  s << "|own_faces_both";
125  if (u & assemble_ghost_cells)
126  s << "|ghost_cells";
128  s << "|ghost_faces_once";
130  s << "|ghost_faces_both";
131  if (u & assemble_boundary_faces)
132  s << "|boundary_faces";
133  return s;
134  }
135 
136 
146  inline AssembleFlags
148  {
149  return static_cast<AssembleFlags>(static_cast<unsigned int>(f1) |
150  static_cast<unsigned int>(f2));
151  }
152 
153 
154 
161  inline AssembleFlags &
163  {
164  f1 = f1 | f2;
165  return f1;
166  }
167 
168 
179  {
180  return static_cast<AssembleFlags>(static_cast<unsigned int>(f1) &
181  static_cast<unsigned int>(f2));
182  }
183 
184 
191  inline AssembleFlags &
193  {
194  f1 = f1 & f2;
195  return f1;
196  }
197 } // namespace MeshWorker
198 
201 DEAL_II_NAMESPACE_CLOSE
202 
203 #endif
AssembleFlags operator|(AssembleFlags f1, AssembleFlags f2)
AssembleFlags operator&(AssembleFlags f1, AssembleFlags f2)
AssembleFlags & operator|=(AssembleFlags &f1, AssembleFlags f2)
AssembleFlags & operator&=(AssembleFlags &f1, AssembleFlags f2)
StreamType & operator<<(StreamType &s, AssembleFlags u)