deal.II version GIT relicensing-6809-ge913b9bb34 2026-09-25 17:20:01+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
tria_objects_orientations.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2023 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_tria_objects_orientations_h
14#define dealii_tria_objects_orientations_h
15
16#include <deal.II/base/config.h>
17
21
23
24#include <vector>
25
27
28namespace internal
29{
30 namespace TriangulationImplementation
31 {
39 {
40 public:
45
50 TriaObjectsOrientations(const std::size_t n_objects,
51 const unsigned int n_faces_per_object);
52
56 std::size_t
57 n_objects() const;
58
62 void
63 reinit(const std::size_t n_objects,
64 const unsigned int n_faces_per_object);
65
70 void
71 resize(const std::size_t n_objects);
72
76 std::size_t
77 memory_consumption() const;
78
85 const unsigned int face_no) const;
86
90 bool
91 get_orientation(const int index, const unsigned int face_no) const;
92
96 bool
97 get_rotation(const int index, const unsigned int face_no) const;
98
102 bool
103 get_flip(const int index, const unsigned int face_no) const;
104
109 void
111 const unsigned int face_no,
113
119 template <class Archive>
120 void
121 serialize(Archive &ar, const unsigned int version);
122
123 private:
127 std::size_t n_stored_objects;
128
132 unsigned int faces_per_object;
133
137 std::vector<types::geometric_orientation> face_orientations;
138 };
139
140 //----------------------------------------------------------------------//
141
146
147
148
150 const std::size_t n_objects,
151 const unsigned int n_faces_per_object)
152 {
153 reinit(n_objects, n_faces_per_object);
154 }
155
156
157
158 inline void
159 TriaObjectsOrientations::reinit(const std::size_t n_objects,
160 const unsigned int n_faces_per_object)
161 {
163 faces_per_object = n_faces_per_object;
166 }
167
168
169
170 inline void
177
178
179
180 inline std::size_t
187
188
189
190 inline std::size_t
197
198
199
202 const int index,
203 const unsigned int face_no) const
204 {
207 const auto i = index * faces_per_object + face_no;
209 return face_orientations[i];
210 }
211
212
213
214 inline bool
216 const unsigned int face_no) const
217 {
219 }
220
221
222
223 inline bool
225 const unsigned int face_no) const
226 {
228 }
229
230
231
232 inline bool
234 const unsigned int face_no) const
235 {
237 }
238
239
240
241 inline void
243 const int index,
244 const unsigned int face_no,
246 {
248 const auto i = index * faces_per_object + face_no;
251 }
252
253
254
255 template <class Archive>
256 void
257 TriaObjectsOrientations::serialize(Archive &ar, const unsigned int)
258 {
260 }
261 } // namespace TriangulationImplementation
262} // namespace internal
263
265
266#endif
types::geometric_orientation get_combined_orientation(const int index, const unsigned int face_no) const
bool get_rotation(const int index, const unsigned int face_no) const
bool get_flip(const int index, const unsigned int face_no) const
void reinit(const std::size_t n_objects, const unsigned int n_faces_per_object)
bool get_orientation(const int index, const unsigned int face_no) const
void set_combined_orientation(const int index, const unsigned int face_no, const types::geometric_orientation value)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)
bool get_bit(const unsigned char number, const unsigned int n)
Definition utilities.h:1564
constexpr unsigned int invalid_unsigned_int
Definition types.h:228
constexpr types::geometric_orientation default_geometric_orientation
Definition types.h:342
std::uint8_t geometric_orientation
Definition types.h:38