Reference documentation for deal.II version 9.3.0
\(\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  {
221  template <int dim,
222  typename VectorType,
223  typename DoFHandlerType = DoFHandler<dim>>
225  {
226 #ifndef DEAL_II_MSVC
227  static_assert(dim == DoFHandlerType::dimension,
228  "The dimension explicitly provided as a template "
229  "argument, and the dimension of the DoFHandlerType "
230  "template argument must match.");
231 #endif
232  public:
241  SolutionTransfer(const DoFHandlerType &dof);
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:
323  SmartPointer<const DoFHandlerType,
326 
331  std::vector<const VectorType *> input_vectors;
332 
337  unsigned int handle;
338 
344  std::vector<char>
347  cell_iterator &cell,
349  CellStatus status);
350 
356  void
359  cell_iterator &cell,
361  CellStatus status,
362  const boost::iterator_range<std::vector<char>::const_iterator>
363  & data_range,
364  std::vector<VectorType *> &all_out);
365 
366 
372  void
374  };
375  } // namespace distributed
376 } // namespace parallel
377 
378 namespace Legacy
379 {
380  namespace parallel
381  {
382  namespace distributed
383  {
390  template <int dim,
391  typename VectorType,
392  typename DoFHandlerType = DoFHandler<dim>>
393  using SolutionTransfer = ::parallel::distributed::
394  SolutionTransfer<dim, VectorType, DoFHandlerType>;
395  } // namespace distributed
396  } // namespace parallel
397 } // namespace Legacy
398 
399 
401 
402 #endif
void prepare_for_coarsening_and_refinement(const std::vector< const VectorType *> &all_in)
std::vector< char > pack_callback(const typename Triangulation< dim, DoFHandlerType::space_dimension >::cell_iterator &cell, const typename Triangulation< dim, DoFHandlerType::space_dimension >::CellStatus status)
SolutionTransfer(const DoFHandlerType &dof)
void interpolate(std::vector< VectorType *> &all_out)
void prepare_for_serialization(const VectorType &in)
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:395
std::vector< const VectorType * > input_vectors
SmartPointer< const DoFHandlerType, SolutionTransfer< dim, VectorType, DoFHandlerType > > dof_handler
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:394
void unpack_callback(const typename Triangulation< dim, DoFHandlerType::space_dimension >::cell_iterator &cell, const typename Triangulation< dim, DoFHandlerType::space_dimension >::CellStatus status, const boost::iterator_range< std::vector< char >::const_iterator > &data_range, std::vector< VectorType *> &all_out)