Reference documentation for deal.II version 8.5.1
solution_transfer.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2009 - 2016 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 at
12 // the top level of the deal.II distribution.
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 #include <deal.II/distributed/tria.h>
21 #include <deal.II/dofs/dof_handler.h>
22 
23 #include <vector>
24 
25 
26 DEAL_II_NAMESPACE_OPEN
27 
28 namespace parallel
29 {
30 
31  namespace distributed
32  {
115  template<int dim, typename VectorType, typename DoFHandlerType=DoFHandler<dim> >
117  {
118  public:
122  SolutionTransfer(const DoFHandlerType &dof);
127 
135  void prepare_for_coarsening_and_refinement (const std::vector<const VectorType *> &all_in);
136 
141  void prepare_for_coarsening_and_refinement (const VectorType &in);
142 
150  void interpolate (std::vector<VectorType *> &all_out);
151 
161  void interpolate (VectorType &out);
162 
163 
167  unsigned int get_data_size() const;
168 
169 
176  void prepare_serialization(const VectorType &in);
177 
178 
182  void prepare_serialization(const std::vector<const VectorType *> &all_in);
183 
184 
191  void deserialize(VectorType &in);
192 
193 
197  void deserialize(std::vector<VectorType *> &all_in);
198 
199  private:
204 
209  std::vector<const VectorType *> input_vectors;
210 
215  unsigned int offset;
216 
223  const typename Triangulation<dim,DoFHandlerType::space_dimension>::CellStatus status,
224  void *data);
225 
232  const typename Triangulation<dim,DoFHandlerType::space_dimension>::CellStatus status,
233  const void *data,
234  std::vector<VectorType *> &all_out);
235 
236 
240  void register_data_attach(const std::size_t size);
241 
242  };
243 
244 
245  }
246 }
247 
248 
249 
250 DEAL_II_NAMESPACE_CLOSE
251 
252 #endif
void prepare_for_coarsening_and_refinement(const std::vector< const VectorType *> &all_in)
SolutionTransfer(const DoFHandlerType &dof)
void pack_callback(const typename Triangulation< dim, DoFHandlerType::space_dimension >::cell_iterator &cell, const typename Triangulation< dim, DoFHandlerType::space_dimension >::CellStatus status, void *data)
void interpolate(std::vector< VectorType *> &all_out)
SmartPointer< const DoFHandlerType, SolutionTransfer< dim, VectorType, DoFHandlerType > > dof_handler
void prepare_serialization(const VectorType &in)
std::vector< const VectorType * > input_vectors
void unpack_callback(const typename Triangulation< dim, DoFHandlerType::space_dimension >::cell_iterator &cell, const typename Triangulation< dim, DoFHandlerType::space_dimension >::CellStatus status, const void *data, std::vector< VectorType *> &all_out)
::Triangulation< dim, spacedim >::cell_iterator cell_iterator
Definition: tria.h:265