Reference documentation for deal.II version Git 7026f387cc 2019-10-15 14:19:01 -0400
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
cell_data_transfer.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 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_cell_data_transfer_h
17 #define dealii_cell_data_transfer_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/base/smartpointer.h>
22 
23 #include <deal.II/grid/tria.h>
24 
25 #include <deal.II/numerics/coarsening_strategies.h>
26 
27 #include <algorithm>
28 #include <functional>
29 #include <set>
30 
31 
32 DEAL_II_NAMESPACE_OPEN
33 
107 template <int dim, int spacedim = dim, typename VectorType = Vector<double>>
109 {
110 private:
114  using value_type = typename VectorType::value_type;
115 
116 public:
128  const std::function<value_type(
129  const std::vector<value_type> &children_indices)> coarsening_strategy =
130  &CoarseningStrategies::check_equality<value_type>);
131 
139  void
141 
149  void
150  unpack(const VectorType &in, VectorType &out);
151 
152 private:
159 
164  const std::function<value_type(
165  const std::vector<value_type> &children_indices)>
167 
172  std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
173  const unsigned int>
175 
180  std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
181  const unsigned int>
183 
189  std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
190  const std::set<unsigned int>>
192 
200  unsigned int n_active_cells_pre;
201 };
202 
203 
204 DEAL_II_NAMESPACE_CLOSE
205 
206 #endif /* dealii_cell_data_transfer_h */
CellDataTransfer(const Triangulation< dim, spacedim > &triangulation, const std::function< value_type(const std::vector< value_type > &children_indices)> coarsening_strategy=&CoarseningStrategies::check_equality< value_type >)
void unpack(const VectorType &in, VectorType &out)
typename VectorType::value_type value_type
std::map< const typename Triangulation< dim, spacedim >::cell_iterator, const unsigned int > refined_cells_active_index
void prepare_for_coarsening_and_refinement()
std::map< const typename Triangulation< dim, spacedim >::cell_iterator, const std::set< unsigned int > > coarsened_cells_active_index
std::map< const typename Triangulation< dim, spacedim >::cell_iterator, const unsigned int > persisting_cells_active_index
unsigned int n_active_cells_pre
const std::function< value_type(const std::vector< value_type > &children_indices)> coarsening_strategy
SmartPointer< const Triangulation< dim, spacedim >, CellDataTransfer< dim, spacedim, VectorType > > triangulation