Reference documentation for deal.II version Git 92c1895bf8 2020-06-04 17:48:28 -0400
\(\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\}}\)
cell_data_transfer.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2019 - 2020 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 
22 
23 #include <deal.II/grid/tria.h>
24 
26 
27 #include <algorithm>
28 #include <functional>
29 #include <set>
30 
31 
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:
130  const std::function<std::vector<value_type>(
131  const typename Triangulation<dim, spacedim>::cell_iterator &parent,
132  const value_type parent_value)> refinement_strategy =
133  &AdaptationStrategies::Refinement::preserve<dim, spacedim, value_type>,
134  const std::function<value_type(
135  const typename Triangulation<dim, spacedim>::cell_iterator &parent,
136  const std::vector<value_type> &children_values)> coarsening_strategy =
138  check_equality<dim, spacedim, value_type>);
139 
147  void
149 
157  void
158  unpack(const VectorType &in, VectorType &out);
159 
160 private:
167 
172  const std::function<std::vector<value_type>(
173  const typename Triangulation<dim, spacedim>::cell_iterator &parent,
174  const value_type parent_value)>
176 
181  const std::function<value_type(
182  const typename Triangulation<dim, spacedim>::cell_iterator &parent,
183  const std::vector<value_type> &children_indices)>
185 
190  std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
191  const unsigned int>
193 
198  std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
199  const unsigned int>
201 
207  std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
208  const std::set<unsigned int>>
210 
218  unsigned int n_active_cells_pre;
219 };
220 
221 
223 
224 #endif /* dealii_cell_data_transfer_h */
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
const std::function< std::vector< value_type > const typename Triangulation< dim, spacedim >::cell_iterator &parent, const value_type parent_value)> refinement_strategy
const std::function< value_type(const typename Triangulation< dim, spacedim >::cell_iterator &parent, const std::vector< value_type > &children_indices)> coarsening_strategy
CellDataTransfer(const Triangulation< dim, spacedim > &triangulation, const std::function< std::vector< value_type >(const typename Triangulation< dim, spacedim >::cell_iterator &parent, const value_type parent_value)> refinement_strategy=&AdaptationStrategies::Refinement::preserve< dim, spacedim, value_type >, const std::function< value_type(const typename Triangulation< dim, spacedim >::cell_iterator &parent, const std::vector< value_type > &children_values)> coarsening_strategy=&AdaptationStrategies::Coarsening::check_equality< dim, spacedim, value_type >)
void prepare_for_coarsening_and_refinement()
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:361
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
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:360
SmartPointer< const Triangulation< dim, spacedim >, CellDataTransfer< dim, spacedim, VectorType > > triangulation