Reference documentation for deal.II version GIT 29f9da0a34 2023-12-07 10:00: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\}}\)
solution_transfer.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2009 - 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_distributed_solution_transfer_h
17 #define dealii_distributed_solution_transfer_h
18 
19 #include <deal.II/base/config.h>
20 
22 
24 
25 #include <vector>
26 
27 
29 
30 namespace parallel
31 {
32  namespace distributed
33  {
223  template <int dim, typename VectorType, int spacedim = dim>
225  {
226  public:
240  const bool average_values = false);
241 
245  ~SolutionTransfer() = default;
246 
254  void
256  const std::vector<const VectorType *> &all_in);
257 
262  void
263  prepare_for_coarsening_and_refinement(const VectorType &in);
264 
272  void
273  interpolate(std::vector<VectorType *> &all_out);
274 
284  void
285  interpolate(VectorType &out);
286 
293  void
294  prepare_for_serialization(const VectorType &in);
295 
299  void
300  prepare_for_serialization(const std::vector<const VectorType *> &all_in);
301 
308  void
309  deserialize(VectorType &in);
310 
311 
315  void
316  deserialize(std::vector<VectorType *> &all_in);
317 
318  private:
325 
329  const bool average_values;
330 
335  std::vector<const VectorType *> input_vectors;
336 
341  unsigned int handle;
342 
348  std::vector<char>
350  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
351  const CellStatus status);
352 
358  void
360  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
361  const CellStatus status,
362  const boost::iterator_range<std::vector<char>::const_iterator>
363  &data_range,
364  std::vector<VectorType *> &all_out,
365  VectorType &valence);
366 
367 
373  void
375  };
376  } // namespace distributed
377 } // namespace parallel
378 
379 
381 
382 #endif
CellStatus
Definition: cell_status.h:32
std::vector< char > pack_callback(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellStatus status)
void unpack_callback(const typename 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, VectorType &valence)
SmartPointer< const DoFHandler< dim, spacedim >, SolutionTransfer< dim, VectorType, spacedim > > dof_handler
std::vector< const VectorType * > input_vectors
void prepare_for_coarsening_and_refinement(const std::vector< const VectorType * > &all_in)
void prepare_for_serialization(const VectorType &in)
void interpolate(std::vector< VectorType * > &all_out)
SolutionTransfer(const DoFHandler< dim, spacedim > &dof_handler, const bool average_values=false)
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:477
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:478