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 
134  explicit Triangulation(MPI_Comm mpi_communicator);
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
175  copy_triangulation(
176  const ::Triangulation<dim, spacedim> &other_tria) override;
177 
195  void
196  set_partitioner(
197  const std::function<void(::Triangulation<dim, spacedim> &,
198  const unsigned int)> &partitioner,
199  const TriangulationDescription::Settings & settings);
200 
207  virtual void
208  execute_coarsening_and_refinement() override;
209 
216  virtual bool
217  prepare_coarsening_and_refinement() override;
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
238  coarse_cell_id_to_coarse_cell_index(
239  const types::coarse_cell_id coarse_cell_id) const override;
240 
241  virtual types::coarse_cell_id
242  coarse_cell_index_to_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)>
255  partitioner;
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
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
std::vector< types::coarse_cell_id > coarse_cell_index_to_coarse_cell_id_vector
void create_triangulation(Triangulation< dim, dim > &tria, const AdditionalData &additional_data=AdditionalData())
typename ::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
Point< 3 > vertices[4]
TriangulationBase< dim, spacedim > Triangulation
Definition: tria_base.h:302
std::vector< std::pair< types::coarse_cell_id, unsigned int > > coarse_cell_id_to_coarse_cell_index_vector
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
global_cell_index coarse_cell_id
Definition: types.h:114
TriangulationDescription::Settings settings
std::enable_if< std::is_fundamental< T >::value, std::size_t >::type memory_consumption(const T &t)