Reference documentation for deal.II version Git 840703ecf3 2019-10-14 17:15:20 -0400
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
tria_base.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2008 - 2019 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 {
75  template <int dim, int spacedim = dim>
76  class TriangulationBase : public ::Triangulation<dim, spacedim>
77  {
78  public:
83  MPI_Comm mpi_communicator,
84  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
86  const bool check_for_distorted_cells = false);
87 
91  virtual ~TriangulationBase() override;
92 
96  virtual MPI_Comm
97  get_communicator() const;
98 
102  virtual void
104  const ::Triangulation<dim, spacedim> &old_tria) override;
105 
114  std::vector<unsigned int>
116 
135  unsigned int
137 
144  n_global_active_cells() const override;
145 
149  virtual std::size_t
150  memory_consumption() const override;
151 
152 
160  virtual unsigned int
161  n_global_levels() const override;
162 
170  locally_owned_subdomain() const override;
171 
180  const std::set<types::subdomain_id> &
181  ghost_owners() const;
182 
192  const std::set<types::subdomain_id> &
193  level_ghost_owners() const;
194 
199  virtual std::map<unsigned int, std::set<::types::subdomain_id>>
201 
202  protected:
209 
215 
220 
225  struct NumberCache
226  {
241  unsigned int n_global_levels;
246  std::set<types::subdomain_id> ghost_owners;
251  std::set<types::subdomain_id> level_ghost_owners;
252 
253  NumberCache();
254  };
255 
256  NumberCache number_cache;
257 
261  virtual void
263 
267  void
269  };
270 
275  template <int dim, int spacedim = dim>
277 
278 
279 
321  template <int dim, int spacedim = dim>
323  : public ::parallel::TriangulationBase<dim, spacedim>
324  {
325  public:
330  MPI_Comm mpi_communicator,
331  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
333  const bool check_for_distorted_cells = false);
334 
338  virtual bool
339  is_multilevel_hierarchy_constructed() const = 0;
340  };
341 
342 } // namespace parallel
343 
344 DEAL_II_NAMESPACE_CLOSE
345 
346 #endif
const std::set< types::subdomain_id > & level_ghost_owners() const
Definition: tria_base.cc:350
const std::set< types::subdomain_id > & ghost_owners() const
Definition: tria_base.cc:341
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &old_tria) override
Definition: tria_base.cc:65
virtual ~TriangulationBase() override
Definition: tria_base.cc:107
virtual types::global_dof_index n_global_active_cells() const override
Definition: tria_base.cc:137
types::global_dof_index n_global_active_cells
Definition: tria_base.h:235
std::set< types::subdomain_id > ghost_owners
Definition: tria_base.h:246
virtual std::size_t memory_consumption() const override
Definition: tria_base.cc:94
const bool check_for_distorted_cells
Definition: tria.h:4046
unsigned int subdomain_id
Definition: types.h:43
types::subdomain_id locally_owned_subdomain() const override
Definition: tria_base.cc:332
virtual MPI_Comm get_communicator() const
Definition: tria_base.cc:173
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:251
virtual std::map< unsigned int, std::set<::types::subdomain_id > > compute_vertices_with_ghost_neighbors() const
Definition: tria_base.cc:359
unsigned int global_dof_index
Definition: types.h:89
virtual void update_number_cache()
Definition: tria_base.cc:181
unsigned int n_locally_owned_active_cells() const
Definition: tria_base.cc:123
std::vector< unsigned int > compute_n_locally_owned_active_cells_per_processor() const
Definition: tria_base.cc:145
virtual unsigned int n_global_levels() const override
Definition: tria_base.cc:130
MeshSmoothing smooth_grid
Definition: tria.h:3627
types::subdomain_id my_subdomain
Definition: tria_base.h:214
types::subdomain_id n_subdomains
Definition: tria_base.h:219