Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
solution_transfer.h
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 
21 #include <deal.II/distributed/tria.h>
22 
23 #include <deal.II/dofs/dof_handler.h>
24 
25 #include <vector>
26 
27 
28 DEAL_II_NAMESPACE_OPEN
29 
30 namespace parallel
31 {
32  namespace distributed
33  {
227  template <int dim,
228  typename VectorType,
229  typename DoFHandlerType = DoFHandler<dim>>
231  {
232 #ifndef DEAL_II_MSVC
233  static_assert(dim == DoFHandlerType::dimension,
234  "The dimension explicitly provided as a template "
235  "argument, and the dimension of the DoFHandlerType "
236  "template argument must match.");
237 #endif
238  public:
247  SolutionTransfer(const DoFHandlerType &dof);
248 
252  ~SolutionTransfer() = default;
253 
261  void
263  const std::vector<const VectorType *> &all_in);
264 
269  void
270  prepare_for_coarsening_and_refinement(const VectorType &in);
271 
279  void
280  interpolate(std::vector<VectorType *> &all_out);
281 
291  void
292  interpolate(VectorType &out);
293 
300  void
301  prepare_for_serialization(const VectorType &in);
302 
306  void
307  prepare_for_serialization(const std::vector<const VectorType *> &all_in);
308 
317  DEAL_II_DEPRECATED
318  void
319  prepare_serialization(const VectorType &in);
320 
326  DEAL_II_DEPRECATED
327  void
328  prepare_serialization(const std::vector<const VectorType *> &all_in);
329 
336  void
337  deserialize(VectorType &in);
338 
339 
343  void
344  deserialize(std::vector<VectorType *> &all_in);
345 
346  private:
350  SmartPointer<const DoFHandlerType,
353 
358  std::vector<const VectorType *> input_vectors;
359 
364  unsigned int handle;
365 
371  std::vector<char>
374  cell_iterator &cell,
376  CellStatus status);
377 
383  void
386  cell_iterator &cell,
388  CellStatus status,
389  const boost::iterator_range<std::vector<char>::const_iterator>
390  & data_range,
391  std::vector<VectorType *> &all_out);
392 
393 
399  void
401  };
402 
403 
404  } // namespace distributed
405 } // namespace parallel
406 
407 
408 
409 DEAL_II_NAMESPACE_CLOSE
410 
411 #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)
void prepare_serialization(const VectorType &in)
std::vector< const VectorType * > input_vectors
SmartPointer< const DoFHandlerType, SolutionTransfer< dim, VectorType, DoFHandlerType > > dof_handler
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)