Reference documentation for deal.II version Git f40be01994 2020-04-09 07:13:12 +0200
\(\newcommand{\vcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\vcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
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 const MPI_Comm &
97  get_communicator() const;
98 
107  virtual void
109  const ::Triangulation<dim, spacedim> &old_tria) override;
110 
119  std::vector<unsigned int>
121 
140  unsigned int
142 
149  n_global_active_cells() const override;
150 
154  virtual std::size_t
155  memory_consumption() const override;
156 
157 
165  virtual unsigned int
166  n_global_levels() const override;
167 
175  locally_owned_subdomain() const override;
176 
186  const std::set<types::subdomain_id> &
187  ghost_owners() const;
188 
204  const std::set<types::subdomain_id> &
205  level_ghost_owners() const;
206 
211  virtual std::map<unsigned int, std::set<::types::subdomain_id>>
213 
214  protected:
221 
227 
232 
237  struct NumberCache
238  {
253  unsigned int n_global_levels;
258  std::set<types::subdomain_id> ghost_owners;
263  std::set<types::subdomain_id> level_ghost_owners;
264 
265  NumberCache();
266  };
267 
268  NumberCache number_cache;
269 
273  virtual void
275 
279  void
281  };
282 
287  template <int dim, int spacedim = dim>
289 
290 
291 
333  template <int dim, int spacedim = dim>
335  : public ::parallel::TriangulationBase<dim, spacedim>
336  {
337  public:
342  MPI_Comm mpi_communicator,
343  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
345  const bool check_for_distorted_cells = false);
346 
350  virtual bool
351  is_multilevel_hierarchy_constructed() const = 0;
352  };
353 
354 } // namespace parallel
355 
356 DEAL_II_NAMESPACE_CLOSE
357 
358 #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:344
const std::set< types::subdomain_id > & ghost_owners() const
Definition: tria_base.cc:335
unsigned int global_cell_index
Definition: types.h:106
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &old_tria) override
Definition: tria_base.cc:63
virtual ~TriangulationBase() override
Definition: tria_base.cc:101
std::set< types::subdomain_id > ghost_owners
Definition: tria_base.h:258
virtual std::size_t memory_consumption() const override
Definition: tria_base.cc:88
const bool check_for_distorted_cells
Definition: tria.h:3855
unsigned int subdomain_id
Definition: types.h:44
types::global_cell_index n_global_active_cells
Definition: tria_base.h:247
types::subdomain_id locally_owned_subdomain() const override
Definition: tria_base.cc:326
virtual const MPI_Comm & get_communicator() const
Definition: tria_base.cc:167
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:263
virtual std::map< unsigned int, std::set<::types::subdomain_id > > compute_vertices_with_ghost_neighbors() const
Definition: tria_base.cc:353
virtual void update_number_cache()
Definition: tria_base.cc:175
unsigned int n_locally_owned_active_cells() const
Definition: tria_base.cc:117
std::vector< unsigned int > compute_n_locally_owned_active_cells_per_processor() const
Definition: tria_base.cc:139
virtual unsigned int n_global_levels() const override
Definition: tria_base.cc:124
MeshSmoothing smooth_grid
Definition: tria.h:3436
types::subdomain_id my_subdomain
Definition: tria_base.h:226
types::subdomain_id n_subdomains
Definition: tria_base.h:231