Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
tria_base.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2008 - 2018 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>
23 #include <deal.II/base/smartpointer.h>
24 #include <deal.II/base/subscriptor.h>
25 #include <deal.II/base/template_constraints.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 
37 DEAL_II_NAMESPACE_OPEN
38 
39 namespace parallel
40 {
46  template <int dim, int spacedim = dim>
47  class Triangulation : public ::Triangulation<dim, spacedim>
48  {
49  public:
54  MPI_Comm mpi_communicator,
55  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
57  const bool check_for_distorted_cells = false);
58 
62  virtual ~Triangulation() override;
63 
67  virtual MPI_Comm
68  get_communicator() const;
69 
73  virtual void
75  const ::Triangulation<dim, spacedim> &old_tria) override;
76 
83  const std::vector<unsigned int> &
85 
86 
105  unsigned int
107 
114  n_global_active_cells() const override;
115 
119  virtual std::size_t
120  memory_consumption() const override;
121 
122 
130  virtual unsigned int
131  n_global_levels() const override;
132 
140  locally_owned_subdomain() const override;
141 
150  const std::set<types::subdomain_id> &
151  ghost_owners() const;
152 
162  const std::set<types::subdomain_id> &
163  level_ghost_owners() const;
164 
169  virtual std::map<unsigned int, std::set<::types::subdomain_id>>
171 
172  protected:
179 
185 
190 
195  struct NumberCache
196  {
201  std::vector<unsigned int> n_locally_owned_active_cells;
212  unsigned int n_global_levels;
217  std::set<types::subdomain_id> ghost_owners;
222  std::set<types::subdomain_id> level_ghost_owners;
223 
224  NumberCache();
225  };
226 
227  NumberCache number_cache;
228 
232  virtual void
234 
238  void
240  };
241 
242 } // namespace parallel
243 
244 DEAL_II_NAMESPACE_CLOSE
245 
246 #endif
types::global_dof_index n_global_active_cells
Definition: tria_base.h:206
virtual std::map< unsigned int, std::set<::types::subdomain_id > > compute_vertices_with_ghost_neighbors() const
Definition: tria_base.cc:362
virtual ~Triangulation() override
Definition: tria_base.cc:110
const std::vector< unsigned int > & n_locally_owned_active_cells_per_processor() const
Definition: tria_base.cc:147
types::subdomain_id locally_owned_subdomain() const override
Definition: tria_base.cc:335
types::subdomain_id my_subdomain
Definition: tria_base.h:184
std::set< types::subdomain_id > ghost_owners
Definition: tria_base.h:217
const std::set< types::subdomain_id > & ghost_owners() const
Definition: tria_base.cc:344
std::set< types::subdomain_id > level_ghost_owners
Definition: tria_base.h:222
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &old_tria) override
Definition: tria_base.cc:66
std::vector< unsigned int > n_locally_owned_active_cells
Definition: tria_base.h:201
const bool check_for_distorted_cells
Definition: tria.h:3987
unsigned int subdomain_id
Definition: types.h:43
virtual void update_number_cache()
Definition: tria_base.cc:163
virtual std::size_t memory_consumption() const override
Definition: tria_base.cc:95
virtual MPI_Comm get_communicator() const
Definition: tria_base.cc:155
virtual unsigned int n_global_levels() const override
Definition: tria_base.cc:133
const std::set< types::subdomain_id > & level_ghost_owners() const
Definition: tria_base.cc:353
unsigned int global_dof_index
Definition: types.h:89
unsigned int n_locally_owned_active_cells() const
Definition: tria_base.cc:126
MeshSmoothing smooth_grid
Definition: tria.h:3568
Triangulation(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
virtual types::global_dof_index n_global_active_cells() const override
Definition: tria_base.cc:140
types::subdomain_id n_subdomains
Definition: tria_base.h:189