deal.II version GIT relicensing-6917-gb466a1809f 2026-10-16 06:30:01+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
cell_data_transfer.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2019 - 2024 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_distributed_cell_data_transfer_h
14#define dealii_distributed_cell_data_transfer_h
15
16#include <deal.II/base/config.h>
17
19
21
23
24#include <boost/range/iterator_range.hpp>
25
26#include <functional>
27
28
30
31namespace parallel
32{
33 namespace distributed
34 {
123 template <int dim, int spacedim = dim, typename VectorType = Vector<double>>
125 {
126 private:
130 using value_type = typename VectorType::value_type;
131
132 public:
151 const bool transfer_variable_size_data = false,
152 const std::function<std::vector<value_type>(
153 const typename ::Triangulation<dim, spacedim>::cell_iterator
154 &parent,
155 const value_type parent_value)> refinement_strategy =
156 &::AdaptationStrategies::Refinement::
157 preserve<dim, spacedim, value_type>,
158 const std::function<value_type(
159 const typename ::Triangulation<dim, spacedim>::cell_iterator
160 &parent,
161 const std::vector<value_type> &children_values)> coarsening_strategy =
162 &::AdaptationStrategies::Coarsening::
163 check_equality<dim, spacedim, value_type>);
164
177 void
179
183 void
185 const std::vector<const VectorType *> &all_in);
186
197 void
198 prepare_for_serialization(const VectorType &in);
199
203 void
204 prepare_for_serialization(const std::vector<const VectorType *> &all_in);
205
210 void
211 unpack(VectorType &out);
212
216 void
217 unpack(std::vector<VectorType *> &all_out);
218
223 void
224 deserialize(VectorType &out);
225
229 void
230 deserialize(std::vector<VectorType *> &all_out);
231
232 private:
239
244
249 const std::function<std::vector<value_type>(
250 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
251 const value_type parent_value)>
253
258 const std::function<value_type(
259 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
260 const std::vector<value_type> &children_values)>
262
267 std::vector<const VectorType *> input_vectors;
268
273 unsigned int handle;
274
279 void
281
287 std::vector<char>
289 Triangulation<dim, spacedim>::cell_iterator &cell,
290 const CellStatus status);
291
297 void
300 cell_iterator &cell,
301 const CellStatus status,
302 const boost::iterator_range<std::vector<char>::const_iterator>
303 &data_range,
304 std::vector<VectorType *> &all_out);
305 };
306 } // namespace distributed
307} // namespace parallel
308
309
311
312#endif /* dealii_distributed_cell_data_transfer_h */
*  *  const_iterator()=default
CellStatus
Definition cell_status.h:29
void prepare_for_serialization(const VectorType &in)
ObserverPointer< const parallel::distributed::Triangulation< dim, spacedim >, CellDataTransfer< dim, spacedim, VectorType > > triangulation
void prepare_for_serialization(const std::vector< const VectorType * > &all_in)
void unpack(std::vector< VectorType * > &all_out)
void prepare_for_coarsening_and_refinement(const VectorType &in)
CellDataTransfer(const parallel::distributed::Triangulation< dim, spacedim > &triangulation, const bool transfer_variable_size_data=false, const std::function< std::vector< value_type >(const typename ::Triangulation< dim, spacedim >::cell_iterator &parent, const value_type parent_value)> refinement_strategy=&::AdaptationStrategies::Refinement::preserve< dim, spacedim, value_type >, const std::function< value_type(const typename ::Triangulation< dim, spacedim >::cell_iterator &parent, const std::vector< value_type > &children_values)> coarsening_strategy=&::AdaptationStrategies::Coarsening::check_equality< dim, spacedim, value_type >)
void deserialize(std::vector< VectorType * > &all_out)
void prepare_for_coarsening_and_refinement(const std::vector< const VectorType * > &all_in)
const std::function< value_type(const typename Triangulation< dim, spacedim >::cell_iterator &parent, const std::vector< value_type > &children_values)> coarsening_strategy
void unpack_callback(const typename parallel::distributed::Triangulation< dim, spacedim >::cell_iterator &cell, const CellStatus status, const boost::iterator_range< std::vector< char >::const_iterator > &data_range, std::vector< VectorType * > &all_out)
std::vector< char > pack_callback(const typename parallel::distributed::Triangulation< dim, spacedim >::cell_iterator &cell, const CellStatus status)
const std::function< std::vector< value_type >(const typename Triangulation< dim, spacedim >::cell_iterator &parent, const value_type parent_value)> refinement_strategy
std::vector< const VectorType * > input_vectors
typename VectorType::value_type value_type
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
typename ::Triangulation< dim, spacedim >::cell_iterator cell_iterator
Definition tria.h:322
STL namespace.