deal.II version GIT relicensing-2206-gaa53ff9447 2024-12-02 09:10:00+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{
45 namespace fullydistributed
46 {
108 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
126 explicit Triangulation(const MPI_Comm mpi_communicator);
127
131 virtual ~Triangulation() = default;
132
149 void
150 create_triangulation(
152 &construction_data) override;
153
160 virtual void
161 create_triangulation(const std::vector<Point<spacedim>> &vertices,
162 const std::vector<::CellData<dim>> &cells,
163 const SubCellData &subcelldata) override;
164
175 void
176 copy_triangulation(
177 const ::Triangulation<dim, spacedim> &other_tria) override;
178
196 void
197 set_partitioner(
198 const std::function<void(::Triangulation<dim, spacedim> &,
199 const unsigned int)> &partitioner,
200 const TriangulationDescription::Settings &settings);
201
206 void
207 set_partitioner(
209 const TriangulationDescription::Settings &settings);
210
215 void
216 repartition();
217
224 virtual void
225 execute_coarsening_and_refinement() override;
226
233 virtual bool
234 prepare_coarsening_and_refinement() override;
235
239 virtual std::size_t
240 memory_consumption() const override;
241
242 virtual bool
243 is_multilevel_hierarchy_constructed() const override;
244
252 virtual void
253 save(const std::string &filename) const override;
254
265 virtual void
266 load(const std::string &filename) override;
267
268 private:
269 virtual unsigned int
270 coarse_cell_id_to_coarse_cell_index(
271 const types::coarse_cell_id coarse_cell_id) const override;
272
275 const unsigned int coarse_cell_index) const override;
276
288 void
289 update_cell_relations();
290
291 virtual void
292 update_number_cache() override;
293
298
302 std::function<void(::Triangulation<dim, spacedim> &,
303 const unsigned int)>
305
311
315 std::vector<std::pair<types::coarse_cell_id, unsigned int>>
317
322 std::vector<types::coarse_cell_id>
324
330
335 bool
337 };
338
339 } // namespace fullydistributed
340} // namespace parallel
341
342
344
345#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
ObserverPointer< 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_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:175
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
std::vector< types::coarse_cell_id > coarse_cell_index_to_coarse_cell_id