Reference documentation for deal.II version GIT relicensing-662-g00096bcf61 2024-05-18 15: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\}}\)
Loading...
Searching...
No Matches
fully_distributed_tria.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2019 - 2023 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_fully_distributed_tria_h
16#define dealii_fully_distributed_tria_h
17
18
19#include <deal.II/base/config.h>
20
22
25
26#include <vector>
27
29
30// Forward declarations
31#ifndef DOXYGEN
32// forward declaration of the data type for periodic face pairs
33namespace GridTools
34{
35 template <typename CellIterator>
36 struct PeriodicFacePair;
37}
38#endif
39
40namespace parallel
41{
47 namespace fullydistributed
48 {
110 template <int dim, int spacedim = dim>
113 : public parallel::DistributedTriangulationBase<dim, spacedim>
114 {
115 public:
117 typename ::Triangulation<dim, spacedim>::cell_iterator;
118
120 typename ::Triangulation<dim, spacedim>::active_cell_iterator;
121
128 explicit Triangulation(const MPI_Comm mpi_communicator);
129
133 virtual ~Triangulation() = default;
134
151 void
152 create_triangulation(
154 &construction_data) override;
155
162 virtual void
163 create_triangulation(const std::vector<Point<spacedim>> &vertices,
164 const std::vector<::CellData<dim>> &cells,
165 const SubCellData &subcelldata) override;
166
177 void
178 copy_triangulation(
179 const ::Triangulation<dim, spacedim> &other_tria) override;
180
198 void
199 set_partitioner(
200 const std::function<void(::Triangulation<dim, spacedim> &,
201 const unsigned int)> &partitioner,
202 const TriangulationDescription::Settings &settings);
203
208 void
209 set_partitioner(
211 const TriangulationDescription::Settings &settings);
212
217 void
218 repartition();
219
226 virtual void
227 execute_coarsening_and_refinement() override;
228
235 virtual bool
236 prepare_coarsening_and_refinement() override;
237
241 virtual std::size_t
242 memory_consumption() const override;
243
244 virtual bool
245 is_multilevel_hierarchy_constructed() const override;
246
254 virtual void
255 save(const std::string &filename) const override;
256
267 virtual void
268 load(const std::string &filename) override;
269
276 virtual void
277 load(const std::string &filename, const bool autopartition) override;
278
279 private:
280 virtual unsigned int
281 coarse_cell_id_to_coarse_cell_index(
282 const types::coarse_cell_id coarse_cell_id) const override;
283
286 const unsigned int coarse_cell_index) const override;
287
299 virtual void
300 update_cell_relations() override;
301
302 virtual void
303 update_number_cache() override;
304
309
313 std::function<void(::Triangulation<dim, spacedim> &,
314 const unsigned int)>
316
322
326 std::vector<std::pair<types::coarse_cell_id, unsigned int>>
328
333 std::vector<types::coarse_cell_id>
335
341
346 bool
348 };
349
350 } // namespace fullydistributed
351} // namespace parallel
352
353
355
356#endif
Definition point.h:111
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:207
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:177
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
Point< 3 > vertices[4]
std::vector< types::coarse_cell_id > coarse_cell_index_to_coarse_cell_id