Reference documentation for deal.II version 9.3.3
\(\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\}}\)
tria_levels.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 1998 - 2021 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_tria_levels_h
17#define dealii_tria_levels_h
18
19
20#include <deal.II/base/config.h>
21
22#include <deal.II/base/point.h>
23
26
27#include <boost/serialization/utility.hpp>
28
29#include <cstdint>
30#include <vector>
31
33
34namespace internal
35{
36 namespace TriangulationImplementation
37 {
56 {
57 public:
63 TriaLevel(const unsigned int dim)
64 : dim(dim)
65 , cells(dim)
66 {}
67
74 {}
75
79 unsigned int dim;
80
89 std::vector<std::uint8_t> refine_flags;
90
95 std::vector<bool> coarsen_flags;
96
97
103 std::vector<unsigned int> active_cell_indices;
104
108 std::vector<types::global_cell_index> global_active_cell_indices;
109
113 std::vector<types::global_cell_index> global_level_cell_indices;
114
148 std::vector<std::pair<int, int>> neighbors;
149
158 std::vector<types::subdomain_id> subdomain_ids;
159
167 std::vector<types::subdomain_id> level_subdomain_ids;
168
178 std::vector<int> parents;
179
187 std::vector<bool> direction_flags;
188
193
218 std::vector<unsigned char> face_orientations;
219
225 std::vector<::ReferenceCell> reference_cell;
226
233 std::vector<unsigned int> cell_vertex_indices_cache;
234
239 std::size_t
240 memory_consumption() const;
241
247 template <class Archive>
248 void
249 serialize(Archive &ar, const unsigned int version);
250 };
251
252
253 template <class Archive>
254 void
255 TriaLevel::serialize(Archive &ar, const unsigned int)
256 {
257 ar &dim;
258
260
261 // do not serialize `active_cell_indices` and `vertex_indices_cache`
262 // here. instead of storing them to the stream and re-reading them again
263 // later, we just rebuild them in Triangulation::load()
264
265 ar &neighbors;
266 ar &subdomain_ids;
268 ar &parents;
269 ar &direction_flags;
270 ar &cells;
271
272 if (dim == 3)
274
275 if (dim == 2 || dim == 3)
276 ar &reference_cell;
277 }
278
279 } // namespace TriangulationImplementation
280} // namespace internal
281
283
284#endif
std::vector< unsigned int > cell_vertex_indices_cache
Definition: tria_levels.h:233
std::vector<::ReferenceCell > reference_cell
Definition: tria_levels.h:225
std::vector< std::pair< int, int > > neighbors
Definition: tria_levels.h:148
std::vector< types::global_cell_index > global_active_cell_indices
Definition: tria_levels.h:108
std::vector< types::global_cell_index > global_level_cell_indices
Definition: tria_levels.h:113
std::vector< unsigned char > face_orientations
Definition: tria_levels.h:218
std::vector< types::subdomain_id > level_subdomain_ids
Definition: tria_levels.h:167
std::vector< std::uint8_t > refine_flags
Definition: tria_levels.h:89
std::vector< types::subdomain_id > subdomain_ids
Definition: tria_levels.h:158
std::vector< unsigned int > active_cell_indices
Definition: tria_levels.h:103
void serialize(Archive &ar, const unsigned int version)
Definition: tria_levels.h:255
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:402
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:403
static const unsigned int invalid_unsigned_int
Definition: types.h:196