Reference documentation for deal.II version Git cd4d0b9268 2020-11-30 14:25:08 -0500
\(\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>
27 
28 #include <deal.II/grid/tria.h>
29 
30 #include <functional>
31 #include <list>
32 #include <set>
33 #include <tuple>
34 #include <utility>
35 #include <vector>
36 
37 
39 
40 namespace parallel
41 {
78  template <int dim, int spacedim = dim>
79  class TriangulationBase : public ::Triangulation<dim, spacedim>
80  {
81  public:
87  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
89  const bool check_for_distorted_cells = false);
90 
94  virtual ~TriangulationBase() override;
95 
99  virtual const MPI_Comm &
100  get_communicator() const;
101 
105  virtual bool
107 
116  virtual void
118  const ::Triangulation<dim, spacedim> &old_tria) override;
119 
138  unsigned int
140 
147  n_global_active_cells() const override;
148 
152  virtual std::size_t
153  memory_consumption() const override;
154 
155 
163  virtual unsigned int
164  n_global_levels() const override;
165 
173  locally_owned_subdomain() const override;
174 
184  const std::set<types::subdomain_id> &
185  ghost_owners() const;
186 
202  const std::set<types::subdomain_id> &
203  level_ghost_owners() const;
204 
211 
217  global_level_cell_index_partitioner(const unsigned int level) const;
218 
227  DEAL_II_DEPRECATED virtual std::map<unsigned int,
228  std::set<::types::subdomain_id>>
230 
237  virtual std::vector<types::boundary_id>
238  get_boundary_ids() const override;
239 
246  virtual std::vector<types::manifold_id>
247  get_manifold_ids() const override;
248 
249  protected:
256 
262 
267 
272  struct NumberCache
273  {
288  unsigned int n_global_levels;
293  std::set<types::subdomain_id> ghost_owners;
298  std::set<types::subdomain_id> level_ghost_owners;
299 
304 
308  std::vector<Utilities::MPI::Partitioner> level_cell_index_partitioners;
309 
310  NumberCache();
311  };
312 
314 
318  virtual void
320 
324  void
325  update_reference_cell_types() override;
326 
330  void
332  };
333 
338  template <int dim, int spacedim = dim>
340 
341 
342 
388  template <int dim, int spacedim = dim>
390  : public ::parallel::TriangulationBase<dim, spacedim>
391  {
392  public:
397  const MPI_Comm &mpi_communicator,
398  const typename ::Triangulation<dim, spacedim>::MeshSmoothing
400  const bool check_for_distorted_cells = false);
401  };
402 
403 } // namespace parallel
404 
406 
407 #endif
virtual types::global_cell_index n_global_active_cells() const override
Definition: tria_base.cc:132
const std::set< types::subdomain_id > & level_ghost_owners() const
Definition: tria_base.cc:336
const Utilities::MPI::Partitioner & global_level_cell_index_partitioner(const unsigned int level) const
Definition: tria_base.cc:539
virtual std::vector< types::boundary_id > get_boundary_ids() const override
Definition: tria_base.cc:355
const std::set< types::subdomain_id > & ghost_owners() const
Definition: tria_base.cc:327
virtual void copy_triangulation(const ::Triangulation< dim, spacedim > &old_tria) override
Definition: tria_base.cc:64
MeshSmoothing smooth_grid
Definition: tria.h:3483
virtual std::vector< types::manifold_id > get_manifold_ids() const override
Definition: tria_base.cc:366
virtual ~TriangulationBase() override
Definition: tria_base.cc:102
std::vector< Utilities::MPI::Partitioner > level_cell_index_partitioners
Definition: tria_base.h:308
std::set< types::subdomain_id > ghost_owners
Definition: tria_base.h:293
virtual std::size_t memory_consumption() const override
Definition: tria_base.cc:89
virtual bool is_multilevel_hierarchy_constructed() const =0
const bool check_for_distorted_cells
Definition: tria.h:3962
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:372
unsigned int level
Definition: grid_out.cc:4343
types::global_cell_index n_global_active_cells
Definition: tria_base.h:282
TriangulationBase(const 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:44
types::subdomain_id locally_owned_subdomain() const override
Definition: tria_base.cc:318
virtual const MPI_Comm & get_communicator() const
Definition: tria_base.cc:139
std::set< types::subdomain_id > level_ghost_owners
Definition: tria_base.h:298
virtual std::map< unsigned int, std::set<::types::subdomain_id > > compute_vertices_with_ghost_neighbors() const
Definition: tria_base.cc:345
virtual void update_number_cache()
Definition: tria_base.cc:147
void update_reference_cell_types() override
Definition: tria_base.cc:292
unsigned int n_locally_owned_active_cells() const
Definition: tria_base.cc:118
const Utilities::MPI::Partitioner & global_active_cell_index_partitioner() const
Definition: tria_base.cc:532
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:371
virtual unsigned int n_global_levels() const override
Definition: tria_base.cc:125
Utilities::MPI::Partitioner active_cell_index_partitioner
Definition: tria_base.h:303
types::subdomain_id my_subdomain
Definition: tria_base.h:261
#define DEAL_II_DEPRECATED
Definition: config.h:152
types::subdomain_id n_subdomains
Definition: tria_base.h:266