Reference documentation for deal.II version 9.2.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 - 2019 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  {
232  template <int dim,
233  typename VectorType,
234  typename DoFHandlerType = DoFHandler<dim>>
236  {
237 #ifndef DEAL_II_MSVC
238  static_assert(dim == DoFHandlerType::dimension,
239  "The dimension explicitly provided as a template "
240  "argument, and the dimension of the DoFHandlerType "
241  "template argument must match.");
242 #endif
243  public:
252  SolutionTransfer(const DoFHandlerType &dof);
253 
257  ~SolutionTransfer() = default;
258 
266  void
268  const std::vector<const VectorType *> &all_in);
269 
274  void
275  prepare_for_coarsening_and_refinement(const VectorType &in);
276 
284  void
285  interpolate(std::vector<VectorType *> &all_out);
286 
296  void
297  interpolate(VectorType &out);
298 
305  void
306  prepare_for_serialization(const VectorType &in);
307 
311  void
312  prepare_for_serialization(const std::vector<const VectorType *> &all_in);
313 
323  void
324  prepare_serialization(const VectorType &in);
325 
332  void
333  prepare_serialization(const std::vector<const VectorType *> &all_in);
334 
341  void
342  deserialize(VectorType &in);
343 
344 
348  void
349  deserialize(std::vector<VectorType *> &all_in);
350 
351  private:
355  SmartPointer<const DoFHandlerType,
358 
363  std::vector<const VectorType *> input_vectors;
364 
369  unsigned int handle;
370 
376  std::vector<char>
379  cell_iterator &cell,
381  CellStatus status);
382 
388  void
391  cell_iterator &cell,
393  CellStatus status,
394  const boost::iterator_range<std::vector<char>::const_iterator>
395  & data_range,
396  std::vector<VectorType *> &all_out);
397 
398 
404  void
406  };
407 
408 
409  } // namespace distributed
410 } // namespace parallel
411 
412 
413 
415 
416 #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:359
void prepare_serialization(const VectorType &in)
std::vector< const VectorType * > input_vectors
SmartPointer< const DoFHandlerType, SolutionTransfer< dim, VectorType, DoFHandlerType > > dof_handler
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
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)
#define DEAL_II_DEPRECATED
Definition: config.h:98