Reference documentation for deal.II version Git f102a78320 2021-10-16 14:49:02 -0400
\(\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 - 2021 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  {
112  template <int dim, int spacedim = dim>
114  : public parallel::DistributedTriangulationBase<dim, spacedim>
115  {
116  public:
117  using cell_iterator =
118  typename ::Triangulation<dim, spacedim>::cell_iterator;
119 
120  using active_cell_iterator =
121  typename ::Triangulation<dim, spacedim>::active_cell_iterator;
122 
123  using CellStatus =
124  typename ::Triangulation<dim, spacedim>::CellStatus;
125 
132  explicit Triangulation(const MPI_Comm &mpi_communicator);
133 
137  virtual ~Triangulation() = default;
138 
146  void
149  &construction_data) override;
150 
157  virtual void
158  create_triangulation(const std::vector<Point<spacedim>> & vertices,
159  const std::vector<::CellData<dim>> &cells,
160  const SubCellData &subcelldata) override;
161 
172  void
173  copy_triangulation(
174  const ::Triangulation<dim, spacedim> &other_tria) override;
175 
193  void
194  set_partitioner(
195  const std::function<void(::Triangulation<dim, spacedim> &,
196  const unsigned int)> &partitioner,
198 
205  virtual void
206  execute_coarsening_and_refinement() override;
207 
214  virtual bool
215  prepare_coarsening_and_refinement() override;
216 
222  virtual bool
223  has_hanging_nodes() const override;
224 
228  virtual std::size_t
229  memory_consumption() const override;
230 
231  virtual bool
232  is_multilevel_hierarchy_constructed() const override;
233 
241  virtual void
242  save(const std::string &filename) const override;
243 
254  virtual void
255  load(const std::string &filename) override;
256 
262  DEAL_II_DEPRECATED_EARLY
263  virtual void
264  load(const std::string &filename, const bool autopartition) override;
265 
266  private:
267  virtual unsigned int
268  coarse_cell_id_to_coarse_cell_index(
269  const types::coarse_cell_id coarse_cell_id) const override;
270 
271  virtual types::coarse_cell_id
273  const unsigned int coarse_cell_index) const override;
274 
286  virtual void
287  update_cell_relations() override;
288 
289  virtual void
290  update_number_cache() override;
291 
296 
300  std::function<void(::Triangulation<dim, spacedim> &,
301  const unsigned int)>
302  partitioner;
303 
307  std::vector<std::pair<types::coarse_cell_id, unsigned int>>
309 
314  std::vector<types::coarse_cell_id>
316 
322 
327  bool
329  };
330 
331  } // namespace fullydistributed
332 } // namespace parallel
333 
334 
336 
337 #endif
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
std::vector< types::coarse_cell_id > coarse_cell_index_to_coarse_cell_id
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:401
Point< 3 > vertices[4]
std::vector< std::pair< types::coarse_cell_id, unsigned int > > coarse_cell_id_to_coarse_cell_index_vector
const TriangulationDescription::Settings settings
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:400
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)