Reference documentation for deal.II version GIT d8dacc551e 2022-08-19 06:50:03+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 - 2022 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  {
109  template <int dim, int spacedim = dim>
111  : public parallel::DistributedTriangulationBase<dim, spacedim>
112  {
113  public:
115  typename ::Triangulation<dim, spacedim>::cell_iterator;
116 
118  typename ::Triangulation<dim, spacedim>::active_cell_iterator;
119 
120  using CellStatus =
121  typename ::Triangulation<dim, spacedim>::CellStatus;
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
171  const ::Triangulation<dim, spacedim> &other_tria) override;
172 
190  void
192  const std::function<void(::Triangulation<dim, spacedim> &,
193  const unsigned int)> &partitioner,
195 
200  void
204 
209  void
210  repartition();
211 
218  virtual void
220 
227  virtual bool
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
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
std::vector< Point< spacedim > > vertices
Definition: tria.h:4167
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
typename ::Triangulation< dim, spacedim >::active_cell_iterator active_cell_iterator
typename ::Triangulation< dim, spacedim >::CellStatus CellStatus
TriangulationDescription::Settings settings
std::vector< types::coarse_cell_id > coarse_cell_index_to_coarse_cell_id_vector
virtual types::coarse_cell_id coarse_cell_index_to_coarse_cell_id(const unsigned int coarse_cell_index) const override
void copy_triangulation(const ::Triangulation< dim, spacedim > &other_tria) override
void set_partitioner(const std::function< void(::Triangulation< dim, spacedim > &, const unsigned int)> &partitioner, const TriangulationDescription::Settings &settings)
Triangulation(const MPI_Comm &mpi_communicator)
SmartPointer< const RepartitioningPolicyTools::Base< dim, spacedim > > partitioner_distributed
virtual unsigned int coarse_cell_id_to_coarse_cell_index(const types::coarse_cell_id coarse_cell_id) const override
std::vector< std::pair< types::coarse_cell_id, unsigned int > > coarse_cell_id_to_coarse_cell_index_vector
virtual void save(const std::string &filename) const override
std::function< void(::Triangulation< dim, spacedim > &, const unsigned int)> partitioner
virtual bool is_multilevel_hierarchy_constructed() const override
void create_triangulation(const TriangulationDescription::Description< dim, spacedim > &construction_data) override
virtual void load(const std::string &filename) override
virtual std::size_t memory_consumption() const override
#define DEAL_II_DEPRECATED
Definition: config.h:164
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
global_cell_index coarse_cell_id
Definition: types.h:114