Reference documentation for deal.II version GIT relicensing-224-gc660c0d696 2024-03-28 18:40:02+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_levels.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 1998 - 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_tria_levels_h
16#define dealii_tria_levels_h
17
18
19#include <deal.II/base/config.h>
20
21#include <deal.II/base/point.h>
22
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
72 : dim(numbers::invalid_unsigned_int)
73 , cells(numbers::invalid_unsigned_int)
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
220
226 std::vector<ReferenceCell> reference_cell;
227
234 std::vector<unsigned int> cell_vertex_indices_cache;
235
240 std::size_t
241 memory_consumption() const;
242
248 template <class Archive>
249 void
250 serialize(Archive &ar, const unsigned int version);
251 };
252
253
254 template <class Archive>
255 void
256 TriaLevel::serialize(Archive &ar, const unsigned int)
257 {
258 ar &dim;
259
261
262 // do not serialize `active_cell_indices` and `vertex_indices_cache`
263 // here. instead of storing them to the stream and re-reading them again
264 // later, we just rebuild them in Triangulation::load()
265
266 ar &neighbors;
267 ar &subdomain_ids;
269 ar &parents;
270 ar &direction_flags;
271 ar &cells;
273 ar &reference_cell;
274 }
275
276 } // namespace TriangulationImplementation
277} // namespace internal
278
280
281#endif
std::vector< unsigned int > cell_vertex_indices_cache
std::vector< std::pair< int, int > > neighbors
std::vector< types::global_cell_index > global_active_cell_indices
std::vector< types::global_cell_index > global_level_cell_indices
std::vector< ReferenceCell > reference_cell
std::vector< types::subdomain_id > level_subdomain_ids
std::vector< types::subdomain_id > subdomain_ids
std::vector< unsigned int > active_cell_indices
void serialize(Archive &ar, const unsigned int version)
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503