Reference documentation for deal.II version 9.2.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\}}\)
tria_base.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2008 - 2020 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_distributed_tria_base_h
17 #define dealii_distributed_tria_base_h
18 
19 
20 #include <deal.II/base/config.h>
21 
22 #include <deal.II/base/mpi.h>
26 
27 #include <deal.II/grid/tria.h>
28 
29 #include <functional>
30 #include <list>
31 #include <set>
32 #include <tuple>
33 #include <utility>
34 #include <vector>
35 
36 
38 
39 namespace parallel
40 {
77  template <int dim, int spacedim = dim>
78  class TriangulationBase : public ::Triangulation<dim, spacedim>
79  {
80  public:
86  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
88  const bool check_for_distorted_cells = false);
89 
93  virtual ~TriangulationBase() override;
94 
98  virtual const MPI_Comm &
99  get_communicator() const;
100 
104  virtual bool
106 
115  virtual void
117  const ::Triangulation<dim, spacedim> &old_tria) override;
118 
137  unsigned int
139 
146  n_global_active_cells() const override;
147 
151  virtual std::size_t
152  memory_consumption() const override;
153 
154 
162  virtual unsigned int
163  n_global_levels() const override;
164 
172  locally_owned_subdomain() const override;
173 
183  const std::set<types::subdomain_id> &
184  ghost_owners() const;
185 
201  const std::set<types::subdomain_id> &
202  level_ghost_owners() const;
203 
212  DEAL_II_DEPRECATED virtual std::map<unsigned int,
213  std::set<::types::subdomain_id>>
215 
222  virtual std::vector<types::boundary_id>
223  get_boundary_ids() const override;
224 
231  virtual std::vector<types::manifold_id>
232  get_manifold_ids() const override;
233 
234  protected:
241 
247 
252 
257  struct NumberCache
258  {
273  unsigned int n_global_levels;
278  std::set<types::subdomain_id> ghost_owners;
283  std::set<types::subdomain_id> level_ghost_owners;
284 
285  NumberCache();
286  };
287 
288  NumberCache number_cache;
289 
293  virtual void
295  };
296 
301  template <int dim, int spacedim = dim>
303 
304 
305 
351  template <int dim, int spacedim = dim>
353  : public ::parallel::TriangulationBase<dim, spacedim>
354  {
355  public:
361  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
363  const bool check_for_distorted_cells = false);
364  };
365 
366 } // namespace parallel
367 
369 
370 #endif
parallel::TriangulationBase::NumberCache::n_locally_owned_active_cells
unsigned int n_locally_owned_active_cells
Definition: tria_base.h:262
parallel::TriangulationBase::copy_triangulation
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &old_tria) override
Definition: tria_base.cc:63
parallel::TriangulationBase::mpi_communicator
MPI_Comm mpi_communicator
Definition: tria_base.h:240
parallel::DistributedTriangulationBase
Definition: tria_base.h:352
parallel::TriangulationBase::level_ghost_owners
const std::set< types::subdomain_id > & level_ghost_owners() const
Definition: tria_base.cc:306
parallel::TriangulationBase::NumberCache::level_ghost_owners
std::set< types::subdomain_id > level_ghost_owners
Definition: tria_base.h:283
parallel::TriangulationBase::get_boundary_ids
virtual std::vector< types::boundary_id > get_boundary_ids() const override
Definition: tria_base.cc:325
parallel::TriangulationBase::ghost_owners
const std::set< types::subdomain_id > & ghost_owners() const
Definition: tria_base.cc:297
tria.h
parallel::TriangulationBase::get_manifold_ids
virtual std::vector< types::manifold_id > get_manifold_ids() const override
Definition: tria_base.cc:336
parallel::TriangulationBase::~TriangulationBase
virtual ~TriangulationBase() override
Definition: tria_base.cc:101
MPI_Comm
Triangulation< dim, dim >::check_for_distorted_cells
const bool check_for_distorted_cells
Definition: tria.h:3872
parallel::DistributedTriangulationBase::DistributedTriangulationBase
DistributedTriangulationBase(MPI_Comm mpi_communicator, const typename ::Triangulation< dim, spacedim >::MeshSmoothing smooth_grid=(::Triangulation< dim, spacedim >::none), const bool check_for_distorted_cells=false)
Definition: tria_base.cc:346
parallel::TriangulationBase::NumberCache
Definition: tria_base.h:257
parallel::TriangulationBase::memory_consumption
virtual std::size_t memory_consumption() const override
Definition: tria_base.cc:88
parallel::TriangulationBase::is_multilevel_hierarchy_constructed
virtual bool is_multilevel_hierarchy_constructed() const =0
parallel::TriangulationBase::NumberCache::n_global_active_cells
types::global_cell_index n_global_active_cells
Definition: tria_base.h:267
mpi.h
subscriptor.h
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
DEAL_II_DEPRECATED
#define DEAL_II_DEPRECATED
Definition: config.h:98
smartpointer.h
parallel::TriangulationBase::locally_owned_subdomain
types::subdomain_id locally_owned_subdomain() const override
Definition: tria_base.cc:288
parallel::TriangulationBase::update_number_cache
virtual void update_number_cache()
Definition: tria_base.cc:146
parallel::TriangulationBase::number_cache
NumberCache number_cache
Definition: tria_base.h:288
parallel::TriangulationBase::NumberCache::NumberCache
NumberCache()
Definition: tria_base.cc:110
unsigned int
parallel::TriangulationBase::n_locally_owned_active_cells
unsigned int n_locally_owned_active_cells() const
Definition: tria_base.cc:117
parallel::TriangulationBase::get_communicator
virtual const MPI_Comm & get_communicator() const
Definition: tria_base.cc:138
parallel::TriangulationBase::TriangulationBase
TriangulationBase(MPI_Comm mpi_communicator, const typename ::Triangulation< dim, spacedim >::MeshSmoothing smooth_grid=(::Triangulation< dim, spacedim >::none), const bool check_for_distorted_cells=false)
Definition: tria_base.cc:43
parallel::TriangulationBase::n_global_levels
virtual unsigned int n_global_levels() const override
Definition: tria_base.cc:124
parallel::TriangulationBase::compute_vertices_with_ghost_neighbors
virtual std::map< unsigned int, std::set<::types::subdomain_id > > compute_vertices_with_ghost_neighbors() const
Definition: tria_base.cc:315
parallel::TriangulationBase
Definition: tria_base.h:78
template_constraints.h
parallel::TriangulationBase::my_subdomain
types::subdomain_id my_subdomain
Definition: tria_base.h:246
config.h
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
parallel::TriangulationBase::n_subdomains
types::subdomain_id n_subdomains
Definition: tria_base.h:251
parallel::TriangulationBase::NumberCache::n_global_levels
unsigned int n_global_levels
Definition: tria_base.h:273
parallel
Definition: distributed.h:416
parallel::TriangulationBase::NumberCache::ghost_owners
std::set< types::subdomain_id > ghost_owners
Definition: tria_base.h:278
Triangulation< dim, dim >::smooth_grid
MeshSmoothing smooth_grid
Definition: tria.h:3419
parallel::TriangulationBase::n_global_active_cells
virtual types::global_cell_index n_global_active_cells() const override
Definition: tria_base.cc:131
int