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_base.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) 2015 - 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_distributed_tria_base_h
14#define dealii_distributed_tria_base_h
15
16
17#include <deal.II/base/config.h>
18
24
25#include <deal.II/grid/tria.h>
26
27#include <functional>
28#include <list>
29#include <set>
30#include <utility>
31#include <vector>
32
33
35
36namespace parallel
37{
75 template <int dim, int spacedim = dim>
77 class TriangulationBase : public ::Triangulation<dim, spacedim>
78 {
79 public:
84 const MPI_Comm mpi_communicator,
85 const typename ::Triangulation<dim, spacedim>::MeshSmoothing
87 const bool check_for_distorted_cells = false);
88
92 virtual ~TriangulationBase() override;
93
97 virtual MPI_Comm
98 get_mpi_communicator() const override;
99
103 virtual bool
105
114 virtual void
115 copy_triangulation(
116 const ::Triangulation<dim, spacedim> &old_tria) override;
117
136 unsigned int
137 n_locally_owned_active_cells() const;
138
165 n_global_active_cells() const override;
166
170 virtual std::size_t
171 memory_consumption() const override;
172
173
181 virtual unsigned int
182 n_global_levels() const override;
183
191 locally_owned_subdomain() const override;
192
202 const std::set<types::subdomain_id> &
203 ghost_owners() const;
204
220 const std::set<types::subdomain_id> &
221 level_ghost_owners() const;
222
223 std::weak_ptr<const Utilities::MPI::Partitioner>
224 global_active_cell_index_partitioner() const override;
225
226 std::weak_ptr<const Utilities::MPI::Partitioner>
227 global_level_cell_index_partitioner(
228 const unsigned int level) const override;
229
243 virtual std::vector<types::boundary_id>
244 get_boundary_ids() const override;
245
261 virtual std::vector<types::manifold_id>
262 get_manifold_ids() const override;
263
316 void
317 communicate_locally_moved_vertices(
318 const std::vector<bool> &vertex_locally_moved);
319
321 n_global_coarse_cells() const override;
322
329 virtual void
330 clear() override;
331
332 protected:
339
345
350
356 {
361
367
372
378 unsigned int n_global_levels;
379
384 std::set<types::subdomain_id> ghost_owners;
385
390 std::set<types::subdomain_id> level_ghost_owners;
391
395 std::shared_ptr<const Utilities::MPI::Partitioner>
397
401 std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
403
404 NumberCache();
405 };
406
408
412 virtual void
413 update_number_cache();
414
418 void
419 reset_global_cell_indices();
420 };
421
422
470 template <int dim, int spacedim = dim>
473 : public ::parallel::TriangulationBase<dim, spacedim>
474 {
475 public:
480 const MPI_Comm mpi_communicator,
481 const typename ::Triangulation<dim, spacedim>::MeshSmoothing
483 const bool check_for_distorted_cells = false);
484
486 typename ::Triangulation<dim, spacedim>::cell_iterator;
487
503 virtual bool
504 has_hanging_nodes() const override;
505
513 using Triangulation<dim, spacedim>::save;
514
515
522 using Triangulation<dim, spacedim>::load;
523 };
524
525} // namespace parallel
526
528
529#endif
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
Definition tria_base.h:486
types::subdomain_id n_subdomains
Definition tria_base.h:349
const MPI_Comm mpi_communicator
Definition tria_base.h:338
virtual bool is_multilevel_hierarchy_constructed() const =0
types::subdomain_id my_subdomain
Definition tria_base.h:344
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:249
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
unsigned int level
Definition grid_out.cc:4642
std::set< types::subdomain_id > level_ghost_owners
Definition tria_base.h:390
types::global_cell_index n_global_active_cells
Definition tria_base.h:366
std::set< types::subdomain_id > ghost_owners
Definition tria_base.h:384
std::shared_ptr< const Utilities::MPI::Partitioner > active_cell_index_partitioner
Definition tria_base.h:396
std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > level_cell_index_partitioners
Definition tria_base.h:402
types::coarse_cell_id number_of_global_coarse_cells
Definition tria_base.h:371