Reference documentation for deal.II version GIT relicensing-1062-gc06da148b8 2024-07-15 19:20: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_base.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2015 - 2024 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_distributed_tria_base_h
16#define dealii_distributed_tria_base_h
17
18
19#include <deal.II/base/config.h>
20
26
27#include <deal.II/grid/tria.h>
28
29#include <functional>
30#include <list>
31#include <set>
32#include <utility>
33#include <vector>
34
35
37
38namespace parallel
39{
77 template <int dim, int spacedim = dim>
79 class TriangulationBase : public ::Triangulation<dim, spacedim>
80 {
81 public:
86 const MPI_Comm mpi_communicator,
87 const typename ::Triangulation<dim, spacedim>::MeshSmoothing
89 const bool check_for_distorted_cells = false);
90
94 virtual ~TriangulationBase() override;
95
99 virtual MPI_Comm
100 get_communicator() const override;
101
105 virtual bool
107
116 virtual void
117 copy_triangulation(
118 const ::Triangulation<dim, spacedim> &old_tria) override;
119
138 unsigned int
139 n_locally_owned_active_cells() const;
140
147 n_global_active_cells() const override;
148
152 virtual std::size_t
153 memory_consumption() const override;
154
155
163 virtual unsigned int
164 n_global_levels() const override;
165
173 locally_owned_subdomain() const override;
174
184 const std::set<types::subdomain_id> &
185 ghost_owners() const;
186
202 const std::set<types::subdomain_id> &
203 level_ghost_owners() const;
204
205 std::weak_ptr<const Utilities::MPI::Partitioner>
206 global_active_cell_index_partitioner() const override;
207
208 std::weak_ptr<const Utilities::MPI::Partitioner>
209 global_level_cell_index_partitioner(
210 const unsigned int level) const override;
211
225 virtual std::vector<types::boundary_id>
226 get_boundary_ids() const override;
227
243 virtual std::vector<types::manifold_id>
244 get_manifold_ids() const override;
245
298 void
299 communicate_locally_moved_vertices(
300 const std::vector<bool> &vertex_locally_moved);
301
303 n_global_coarse_cells() const override;
304
311 virtual void
312 clear() override;
313
314 protected:
321
327
332
338 {
343
349
354
360 unsigned int n_global_levels;
361
366 std::set<types::subdomain_id> ghost_owners;
367
372 std::set<types::subdomain_id> level_ghost_owners;
373
377 std::shared_ptr<const Utilities::MPI::Partitioner>
379
383 std::vector<std::shared_ptr<const Utilities::MPI::Partitioner>>
385
386 NumberCache();
387 };
388
390
394 virtual void
395 update_number_cache();
396
397 void
398 update_reference_cells() override;
399
403 void
404 reset_global_cell_indices();
405 };
406
407
455 template <int dim, int spacedim = dim>
458 : public ::parallel::TriangulationBase<dim, spacedim>
459 {
460 public:
465 const MPI_Comm mpi_communicator,
466 const typename ::Triangulation<dim, spacedim>::MeshSmoothing
468 const bool check_for_distorted_cells = false);
469
471 typename ::Triangulation<dim, spacedim>::cell_iterator;
472
488 virtual bool
489 has_hanging_nodes() const override;
490
498 using Triangulation<dim, spacedim>::save;
499
500
507 using Triangulation<dim, spacedim>::load;
508
509
516 virtual void
517 load(const std::string &filename, const bool autopartition) = 0;
518 };
519
520} // namespace parallel
521
523
524#endif
virtual void load(const std::string &filename, const bool autopartition)=0
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
Definition tria_base.h:471
types::subdomain_id n_subdomains
Definition tria_base.h:331
const MPI_Comm mpi_communicator
Definition tria_base.h:320
virtual bool is_multilevel_hierarchy_constructed() const =0
types::subdomain_id my_subdomain
Definition tria_base.h:326
#define DEAL_II_DEPRECATED
Definition config.h:207
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:177
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
unsigned int level
Definition grid_out.cc:4626
std::set< types::subdomain_id > level_ghost_owners
Definition tria_base.h:372
types::global_cell_index n_global_active_cells
Definition tria_base.h:348
std::set< types::subdomain_id > ghost_owners
Definition tria_base.h:366
std::shared_ptr< const Utilities::MPI::Partitioner > active_cell_index_partitioner
Definition tria_base.h:378
std::vector< std::shared_ptr< const Utilities::MPI::Partitioner > > level_cell_index_partitioners
Definition tria_base.h:384
types::coarse_cell_id number_of_global_coarse_cells
Definition tria_base.h:353