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:
85  MPI_Comm mpi_communicator,
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 
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:
360  MPI_Comm mpi_communicator,
361  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
363  const bool check_for_distorted_cells = false);
364  };
365 
366 } // namespace parallel
367 
369 
370 #endif
virtual types::global_cell_index n_global_active_cells() const override
Definition: tria_base.cc:131
const std::set< types::subdomain_id > & level_ghost_owners() const
Definition: tria_base.cc:306
virtual std::vector< types::boundary_id > get_boundary_ids() const override
Definition: tria_base.cc:325
const std::set< types::subdomain_id > & ghost_owners() const
Definition: tria_base.cc:297
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &old_tria) override
Definition: tria_base.cc:63
virtual std::vector< types::manifold_id > get_manifold_ids() const override
Definition: tria_base.cc:336
virtual ~TriangulationBase() override
Definition: tria_base.cc:101
std::set< types::subdomain_id > ghost_owners
Definition: tria_base.h:278
virtual std::size_t memory_consumption() const override
Definition: tria_base.cc:88
virtual bool is_multilevel_hierarchy_constructed() const =0
const bool check_for_distorted_cells
Definition: tria.h:3872
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
types::global_cell_index n_global_active_cells
Definition: tria_base.h:267
types::subdomain_id locally_owned_subdomain() const override
Definition: tria_base.cc:288
virtual const MPI_Comm & get_communicator() const
Definition: tria_base.cc:138
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
std::set< types::subdomain_id > level_ghost_owners
Definition: tria_base.h:283
virtual std::map< unsigned int, std::set<::types::subdomain_id > > compute_vertices_with_ghost_neighbors() const
Definition: tria_base.cc:315
virtual void update_number_cache()
Definition: tria_base.cc:146
unsigned int n_locally_owned_active_cells() const
Definition: tria_base.cc:117
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
virtual unsigned int n_global_levels() const override
Definition: tria_base.cc:124
MeshSmoothing smooth_grid
Definition: tria.h:3419
types::subdomain_id my_subdomain
Definition: tria_base.h:246
#define DEAL_II_DEPRECATED
Definition: config.h:98
types::subdomain_id n_subdomains
Definition: tria_base.h:251