Reference documentation for deal.II version GIT relicensing-822-gf1642d4ea5 2024-06-12 14:10: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
96 std::vector<std::uint8_t> refine_choice;
97
102 std::vector<bool> coarsen_flags;
103
104
110 std::vector<unsigned int> active_cell_indices;
111
115 std::vector<types::global_cell_index> global_active_cell_indices;
116
120 std::vector<types::global_cell_index> global_level_cell_indices;
121
155 std::vector<std::pair<int, int>> neighbors;
156
165 std::vector<types::subdomain_id> subdomain_ids;
166
174 std::vector<types::subdomain_id> level_subdomain_ids;
175
185 std::vector<int> parents;
186
194 std::vector<bool> direction_flags;
195
200
227
233 std::vector<ReferenceCell> reference_cell;
234
241 std::vector<unsigned int> cell_vertex_indices_cache;
242
247 std::size_t
248 memory_consumption() const;
249
255 template <class Archive>
256 void
257 serialize(Archive &ar, const unsigned int version);
258 };
259
260
261 template <class Archive>
262 void
263 TriaLevel::serialize(Archive &ar, const unsigned int)
264 {
265 ar &dim;
266
268
269 // do not serialize `active_cell_indices` and `vertex_indices_cache`
270 // here. instead of storing them to the stream and re-reading them again
271 // later, we just rebuild them in Triangulation::load()
272
273 ar &neighbors;
276 ar &parents;
278 ar &cells;
281 }
282
283 } // namespace TriangulationImplementation
284} // namespace internal
285
287
288#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