Reference documentation for deal.II version GIT 741a3088b8 2023-04-01 07:05: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\}}\)
solution_transfer.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2009 - 2021 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  {
224  template <int dim, typename VectorType, int spacedim = dim>
226  {
227  public:
241  const bool average_values = false);
242 
246  ~SolutionTransfer() = default;
247 
255  void
257  const std::vector<const VectorType *> &all_in);
258 
263  void
264  prepare_for_coarsening_and_refinement(const VectorType &in);
265 
273  void
274  interpolate(std::vector<VectorType *> &all_out);
275 
285  void
286  interpolate(VectorType &out);
287 
294  void
295  prepare_for_serialization(const VectorType &in);
296 
300  void
301  prepare_for_serialization(const std::vector<const VectorType *> &all_in);
302 
309  void
310  deserialize(VectorType &in);
311 
312 
316  void
317  deserialize(std::vector<VectorType *> &all_in);
318 
319  private:
326 
330  const bool average_values;
331 
336  std::vector<const VectorType *> input_vectors;
337 
342  unsigned int handle;
343 
349  std::vector<char>
351  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
352  const typename Triangulation<dim, spacedim>::CellStatus status);
353 
359  void
361  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
362  const typename Triangulation<dim, spacedim>::CellStatus status,
363  const boost::iterator_range<std::vector<char>::const_iterator>
364  & data_range,
365  std::vector<VectorType *> &all_out,
366  VectorType & valence);
367 
368 
374  void
376  };
377  } // namespace distributed
378 } // namespace parallel
379 
380 
382 
383 #endif
void unpack_callback(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename Triangulation< dim, spacedim >::CellStatus status, const boost::iterator_range< std::vector< char >::const_iterator > &data_range, std::vector< VectorType * > &all_out, VectorType &valence)
std::vector< char > pack_callback(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename Triangulation< dim, spacedim >::CellStatus status)
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:474
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:475