Reference documentation for deal.II version 9.5.0
\(\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// Copyright (C) 1998 - 2023 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
27
28#include <boost/serialization/utility.hpp>
29
30#include <cstdint>
31#include <vector>
32
34
35namespace internal
36{
37 namespace TriangulationImplementation
38 {
57 {
58 public:
64 TriaLevel(const unsigned int dim)
65 : dim(dim)
66 , cells(dim)
67 {}
68
73 : dim(numbers::invalid_unsigned_int)
74 , cells(numbers::invalid_unsigned_int)
75 {}
76
80 unsigned int dim;
81
90 std::vector<std::uint8_t> refine_flags;
91
96 std::vector<bool> coarsen_flags;
97
98
104 std::vector<unsigned int> active_cell_indices;
105
109 std::vector<types::global_cell_index> global_active_cell_indices;
110
114 std::vector<types::global_cell_index> global_level_cell_indices;
115
149 std::vector<std::pair<int, int>> neighbors;
150
159 std::vector<types::subdomain_id> subdomain_ids;
160
168 std::vector<types::subdomain_id> level_subdomain_ids;
169
179 std::vector<int> parents;
180
188 std::vector<bool> direction_flags;
189
194
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:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473