Reference documentation for deal.II version GIT c14369f203 2023-10-01 07:40:02+00:00
\(\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 - 2023 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 
22 #include <deal.II/base/mpi_stub.h>
23 
26 
27 #include <vector>
28 
30 
31 // Forward declarations
32 #ifndef DOXYGEN
33 // forward declaration of the data type for periodic face pairs
34 namespace GridTools
35 {
36  template <typename CellIterator>
37  struct PeriodicFacePair;
38 }
39 #endif
40 
41 namespace parallel
42 {
48  namespace fullydistributed
49  {
111  template <int dim, int spacedim = dim>
112  DEAL_II_CXX20_REQUIRES((concepts::is_valid_dim_spacedim<dim, spacedim>))
114  : public parallel::DistributedTriangulationBase<dim, spacedim>
115  {
116  public:
118  typename ::Triangulation<dim, spacedim>::cell_iterator;
119 
121  typename ::Triangulation<dim, spacedim>::active_cell_iterator;
122 
129  explicit Triangulation(const MPI_Comm mpi_communicator);
130 
134  virtual ~Triangulation() = default;
135 
143  void
146  &construction_data) override;
147 
154  virtual void
155  create_triangulation(const std::vector<Point<spacedim>> &vertices,
156  const std::vector<::CellData<dim>> &cells,
157  const SubCellData &subcelldata) override;
158 
169  void
170  copy_triangulation(
171  const ::Triangulation<dim, spacedim> &other_tria) override;
172 
190  void
191  set_partitioner(
192  const std::function<void(::Triangulation<dim, spacedim> &,
193  const unsigned int)> &partitioner,
195 
200  void
201  set_partitioner(
204 
209  void
210  repartition();
211 
218  virtual void
219  execute_coarsening_and_refinement() override;
220 
227  virtual bool
228  prepare_coarsening_and_refinement() override;
229 
233  virtual std::size_t
234  memory_consumption() const override;
235 
236  virtual bool
237  is_multilevel_hierarchy_constructed() const override;
238 
246  virtual void
247  save(const std::string &filename) const override;
248 
259  virtual void
260  load(const std::string &filename) override;
261 
268  virtual void
269  load(const std::string &filename, const bool autopartition) override;
270 
271  private:
272  virtual unsigned int
273  coarse_cell_id_to_coarse_cell_index(
274  const types::coarse_cell_id coarse_cell_id) const override;
275 
276  virtual types::coarse_cell_id
278  const unsigned int coarse_cell_index) const override;
279 
291  virtual void
292  update_cell_relations() override;
293 
294  virtual void
295  update_number_cache() override;
296 
301 
305  std::function<void(::Triangulation<dim, spacedim> &,
306  const unsigned int)>
308 
314 
318  std::vector<std::pair<types::coarse_cell_id, unsigned int>>
320 
325  std::vector<types::coarse_cell_id>
327 
333 
338  bool
340  };
341 
342  } // namespace fullydistributed
343 } // namespace parallel
344 
345 
347 
348 #endif
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
typename ::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
TriangulationDescription::Settings settings
std::vector< types::coarse_cell_id > coarse_cell_index_to_coarse_cell_id_vector
SmartPointer< const RepartitioningPolicyTools::Base< dim, spacedim > > partitioner_distributed
std::vector< std::pair< types::coarse_cell_id, unsigned int > > coarse_cell_id_to_coarse_cell_index_vector
std::function< void(::Triangulation< dim, spacedim > &, const unsigned int)> partitioner
#define DEAL_II_DEPRECATED
Definition: config.h:178
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_CXX20_REQUIRES(condition)
Definition: config.h:166
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478
Point< 3 > vertices[4]
void create_triangulation(Triangulation< dim, dim > &tria, const AdditionalData &additional_data=AdditionalData())
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)
global_cell_index coarse_cell_id
Definition: types.h:127
const TriangulationDescription::Settings settings
std::vector< types::coarse_cell_id > coarse_cell_index_to_coarse_cell_id