Reference documentation for deal.II version 9.2.0
\(\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\}}\)
fully_distributed_tria.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 - 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_fully_distributed_tria_h
17 #define dealii_fully_distributed_tria_h
18 
19 
20 #include <deal.II/base/config.h>
21 
23 
25 
26 #include <vector>
27 
28 #ifdef DEAL_II_WITH_MPI
29 # include <mpi.h>
30 #endif
31 
33 
34 // Forward declarations
35 #ifndef DOXYGEN
36 // forward declaration of the data type for periodic face pairs
37 namespace GridTools
38 {
39  template <typename CellIterator>
40  struct PeriodicFacePair;
41 }
42 #endif
43 
44 namespace parallel
45 {
51  namespace fullydistributed
52  {
114  template <int dim, int spacedim = dim>
116  : public parallel::DistributedTriangulationBase<dim, spacedim>
117  {
118  public:
119  using cell_iterator =
120  typename ::Triangulation<dim, spacedim>::cell_iterator;
121 
122  using active_cell_iterator =
123  typename ::Triangulation<dim, spacedim>::active_cell_iterator;
124 
125  using CellStatus =
126  typename ::Triangulation<dim, spacedim>::CellStatus;
127 
135 
139  virtual ~Triangulation() = default;
140 
148  void
151  &construction_data) override;
152 
159  virtual void
160  create_triangulation(const std::vector<Point<spacedim>> & vertices,
161  const std::vector<::CellData<dim>> &cells,
162  const SubCellData &subcelldata) override;
163 
174  void
176  const ::Triangulation<dim, spacedim> &other_tria) override;
177 
195  void
197  const std::function<void(::Triangulation<dim, spacedim> &,
198  const unsigned int)> &partitioner,
200 
207  virtual void
209 
216  virtual bool
218 
224  virtual bool
225  has_hanging_nodes() const override;
226 
230  virtual std::size_t
231  memory_consumption() const override;
232 
233  virtual bool
234  is_multilevel_hierarchy_constructed() const override;
235 
236  private:
237  virtual unsigned int
239  const types::coarse_cell_id coarse_cell_id) const override;
240 
241  virtual types::coarse_cell_id
243  const unsigned int coarse_cell_index) const override;
244 
249 
253  std::function<void(::Triangulation<dim, spacedim> &,
254  const unsigned int)>
256 
260  std::vector<std::pair<types::coarse_cell_id, unsigned int>>
262 
267  std::vector<types::coarse_cell_id>
269 
275 
280  bool
282  };
283 
284  } // namespace fullydistributed
285 } // namespace parallel
286 
287 
289 
290 #endif
GridTools
Definition: grid_tools.h:125
parallel::TriangulationBase::mpi_communicator
MPI_Comm mpi_communicator
Definition: tria_base.h:240
parallel::DistributedTriangulationBase
Definition: tria_base.h:352
parallel::fullydistributed::Triangulation::set_partitioner
void set_partitioner(const std::function< void(::Triangulation< dim, spacedim > &, const unsigned int)> &partitioner, const TriangulationDescription::Settings &settings)
Definition: fully_distributed_tria.cc:286
parallel::fullydistributed::Triangulation
Definition: fully_distributed_tria.h:115
CellData
Definition: tria_description.h:67
parallel::fullydistributed::Triangulation::execute_coarsening_and_refinement
virtual void execute_coarsening_and_refinement() override
Definition: fully_distributed_tria.cc:299
MPI_Comm
parallel::fullydistributed::Triangulation::Triangulation
Triangulation(MPI_Comm mpi_communicator)
Definition: fully_distributed_tria.cc:43
parallel::fullydistributed::Triangulation::coarse_cell_index_to_coarse_cell_id_vector
std::vector< types::coarse_cell_id > coarse_cell_index_to_coarse_cell_id_vector
Definition: fully_distributed_tria.h:268
parallel::fullydistributed::Triangulation::CellStatus
typename ::Triangulation< dim, spacedim >::CellStatus CellStatus
Definition: fully_distributed_tria.h:126
parallel::fullydistributed::Triangulation::memory_consumption
virtual std::size_t memory_consumption() const override
Definition: fully_distributed_tria.cc:332
parallel::fullydistributed::Triangulation::~Triangulation
virtual ~Triangulation()=default
mpi.h
grid_tools.h
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
parallel::fullydistributed::Triangulation::settings
TriangulationDescription::Settings settings
Definition: fully_distributed_tria.h:248
parallel::fullydistributed::Triangulation::prepare_coarsening_and_refinement
virtual bool prepare_coarsening_and_refinement() override
Definition: fully_distributed_tria.cc:308
parallel::fullydistributed::Triangulation::cell_iterator
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
Definition: fully_distributed_tria.h:120
parallel::fullydistributed::Triangulation::create_triangulation
void create_triangulation(const TriangulationDescription::Description< dim, spacedim > &construction_data) override
Definition: fully_distributed_tria.cc:59
parallel::fullydistributed::Triangulation::partitioner
std::function< void(::Triangulation< dim, spacedim > &, const unsigned int)> partitioner
Definition: fully_distributed_tria.h:255
parallel::fullydistributed::Triangulation::copy_triangulation
void copy_triangulation(const ::Triangulation< dim, spacedim > &other_tria) override
Definition: fully_distributed_tria.cc:232
unsigned int
types::coarse_cell_id
global_cell_index coarse_cell_id
Definition: types.h:114
parallel::fullydistributed::Triangulation::active_cell_iterator
typename ::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
Definition: fully_distributed_tria.h:123
parallel::fullydistributed::Triangulation::coarse_cell_index_to_coarse_cell_id
virtual types::coarse_cell_id coarse_cell_index_to_coarse_cell_id(const unsigned int coarse_cell_index) const override
Definition: fully_distributed_tria.cc:378
parallel::fullydistributed::Triangulation::currently_processing_create_triangulation_for_internal_usage
bool currently_processing_create_triangulation_for_internal_usage
Definition: fully_distributed_tria.h:274
Triangulation< dim, dim >::vertices
std::vector< Point< spacedim > > vertices
Definition: tria.h:3848
Point< spacedim >
parallel::fullydistributed::Triangulation::coarse_cell_id_to_coarse_cell_index_vector
std::vector< std::pair< types::coarse_cell_id, unsigned int > > coarse_cell_id_to_coarse_cell_index_vector
Definition: fully_distributed_tria.h:261
parallel::fullydistributed::Triangulation::has_hanging_nodes
virtual bool has_hanging_nodes() const override
Definition: fully_distributed_tria.cc:322
parallel::fullydistributed::Triangulation::is_multilevel_hierarchy_constructed
virtual bool is_multilevel_hierarchy_constructed() const override
Definition: fully_distributed_tria.cc:348
config.h
parallel::fullydistributed::Triangulation::coarse_cell_id_to_coarse_cell_index
virtual unsigned int coarse_cell_id_to_coarse_cell_index(const types::coarse_cell_id coarse_cell_id) const override
Definition: fully_distributed_tria.cc:359
TriangulationDescription::Description
Definition: tria_description.h:347
SubCellData
Definition: tria_description.h:199
TriangulationDescription::Settings
Settings
Definition: tria_description.h:253
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
parallel::fullydistributed::Triangulation::currently_processing_prepare_coarsening_and_refinement_for_internal_usage
bool currently_processing_prepare_coarsening_and_refinement_for_internal_usage
Definition: fully_distributed_tria.h:281
parallel
Definition: distributed.h:416
tria_base.h