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
276 
284  void
285  interpolate(std::vector<VectorType *> &all_out);
286 
296  void
297  interpolate(VectorType &out);
298 
305  void
307 
311  void
312  prepare_for_serialization(const std::vector<const VectorType *> &all_in);
313 
323  void
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
parallel::distributed::SolutionTransfer::prepare_for_serialization
void prepare_for_serialization(const VectorType &in)
Definition: solution_transfer.cc:183
parallel::distributed::SolutionTransfer::unpack_callback
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)
Definition: solution_transfer.cc:384
parallel::distributed::SolutionTransfer::~SolutionTransfer
~SolutionTransfer()=default
VectorType
parallel::distributed::SolutionTransfer::dof_handler
SmartPointer< const DoFHandlerType, SolutionTransfer< dim, VectorType, DoFHandlerType > > dof_handler
Definition: solution_transfer.h:357
parallel::distributed::SolutionTransfer::handle
unsigned int handle
Definition: solution_transfer.h:369
DoFHandler< dim >
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
parallel::distributed::SolutionTransfer::SolutionTransfer
SolutionTransfer(const DoFHandlerType &dof)
Definition: solution_transfer.cc:118
parallel::distributed::Triangulation
Definition: tria.h:242
DEAL_II_DEPRECATED
#define DEAL_II_DEPRECATED
Definition: config.h:98
parallel::distributed::SolutionTransfer::pack_callback
std::vector< char > pack_callback(const typename Triangulation< dim, DoFHandlerType::space_dimension >::cell_iterator &cell, const typename Triangulation< dim, DoFHandlerType::space_dimension >::CellStatus status)
Definition: solution_transfer.cc:298
parallel::distributed::SolutionTransfer::deserialize
void deserialize(VectorType &in)
Definition: solution_transfer.cc:223
SmartPointer
Definition: smartpointer.h:68
tria.h
parallel::distributed::SolutionTransfer::register_data_attach
void register_data_attach()
Definition: solution_transfer.cc:147
dof_handler.h
config.h
parallel::distributed::SolutionTransfer::interpolate
void interpolate(std::vector< VectorType * > &all_out)
Definition: solution_transfer.cc:248
parallel::distributed::SolutionTransfer
Definition: solution_transfer.h:235
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
parallel::distributed::SolutionTransfer::prepare_for_coarsening_and_refinement
void prepare_for_coarsening_and_refinement(const std::vector< const VectorType * > &all_in)
Definition: solution_transfer.cc:136
parallel
Definition: distributed.h:416
parallel::distributed::SolutionTransfer::prepare_serialization
void prepare_serialization(const VectorType &in)
Definition: solution_transfer.cc:203
parallel::distributed::SolutionTransfer::input_vectors
std::vector< const VectorType * > input_vectors
Definition: solution_transfer.h:363