Reference documentation for deal.II version Git 3ff8e288d2 2020-02-20 17:30:00 +0100
\(\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 
185  const std::set<types::subdomain_id> &
186  ghost_owners() const;
187 
197  const std::set<types::subdomain_id> &
198  level_ghost_owners() const;
199 
204  virtual std::map<unsigned int, std::set<::types::subdomain_id>>
206 
207  protected:
214 
220 
225 
230  struct NumberCache
231  {
246  unsigned int n_global_levels;
251  std::set<types::subdomain_id> ghost_owners;
256  std::set<types::subdomain_id> level_ghost_owners;
257 
258  NumberCache();
259  };
260 
261  NumberCache number_cache;
262 
266  virtual void
268 
272  void
274  };
275 
280  template <int dim, int spacedim = dim>
282 
283 
284 
326  template <int dim, int spacedim = dim>
328  : public ::parallel::TriangulationBase<dim, spacedim>
329  {
330  public:
335  MPI_Comm mpi_communicator,
336  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
338  const bool check_for_distorted_cells = false);
339 
343  virtual bool
344  is_multilevel_hierarchy_constructed() const = 0;
345  };
346 
347 } // namespace parallel
348 
349 DEAL_II_NAMESPACE_CLOSE
350 
351 #endif
const std::set< types::subdomain_id > & level_ghost_owners() const
Definition: tria_base.cc:354
const std::set< types::subdomain_id > & ghost_owners() const
Definition: tria_base.cc:345
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &old_tria) override
Definition: tria_base.cc:65
virtual ~TriangulationBase() override
Definition: tria_base.cc:105
virtual types::global_dof_index n_global_active_cells() const override
Definition: tria_base.cc:135
types::global_dof_index n_global_active_cells
Definition: tria_base.h:240
std::set< types::subdomain_id > ghost_owners
Definition: tria_base.h:251
virtual std::size_t memory_consumption() const override
Definition: tria_base.cc:92
const bool check_for_distorted_cells
Definition: tria.h:3874
unsigned int subdomain_id
Definition: types.h:43
types::subdomain_id locally_owned_subdomain() const override
Definition: tria_base.cc:336
virtual const MPI_Comm & get_communicator() const
Definition: tria_base.cc:171
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:256
virtual std::map< unsigned int, std::set<::types::subdomain_id > > compute_vertices_with_ghost_neighbors() const
Definition: tria_base.cc:363
unsigned int global_dof_index
Definition: types.h:89
virtual void update_number_cache()
Definition: tria_base.cc:179
unsigned int n_locally_owned_active_cells() const
Definition: tria_base.cc:121
std::vector< unsigned int > compute_n_locally_owned_active_cells_per_processor() const
Definition: tria_base.cc:143
virtual unsigned int n_global_levels() const override
Definition: tria_base.cc:128
MeshSmoothing smooth_grid
Definition: tria.h:3455
types::subdomain_id my_subdomain
Definition: tria_base.h:219
types::subdomain_id n_subdomains
Definition: tria_base.h:224