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\}}\)
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 */
CellDataTransfer::refined_cells_active_index
std::map< const typename Triangulation< dim, spacedim >::cell_iterator, const unsigned int > refined_cells_active_index
Definition: cell_data_transfer.h:200
CellDataTransfer::n_active_cells_pre
unsigned int n_active_cells_pre
Definition: cell_data_transfer.h:218
adaptation_strategies.h
CellDataTransfer::unpack
void unpack(const VectorType &in, VectorType &out)
CellDataTransfer::triangulation
SmartPointer< const Triangulation< dim, spacedim >, CellDataTransfer< dim, spacedim, VectorType > > triangulation
Definition: cell_data_transfer.h:166
CellDataTransfer
Definition: cell_data_transfer.h:108
Triangulation
Definition: tria.h:1109
tria.h
VectorType
CellDataTransfer::prepare_for_coarsening_and_refinement
void prepare_for_coarsening_and_refinement()
AdaptationStrategies::Coarsening
Definition: adaptation_strategies.h:120
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
CellDataTransfer::persisting_cells_active_index
std::map< const typename Triangulation< dim, spacedim >::cell_iterator, const unsigned int > persisting_cells_active_index
Definition: cell_data_transfer.h:192
CellDataTransfer::CellDataTransfer
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 >)
smartpointer.h
CellDataTransfer::coarsened_cells_active_index
std::map< const typename Triangulation< dim, spacedim >::cell_iterator, const std::set< unsigned int > > coarsened_cells_active_index
Definition: cell_data_transfer.h:209
SmartPointer
Definition: smartpointer.h:68
CellDataTransfer::coarsening_strategy
const std::function< value_type(const typename Triangulation< dim, spacedim >::cell_iterator &parent, const std::vector< value_type > &children_indices)> coarsening_strategy
Definition: cell_data_transfer.h:184
config.h
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359
TriaIterator
Definition: tria_iterator.h:578
CellDataTransfer::value_type
typename VectorType::value_type value_type
Definition: cell_data_transfer.h:114
CellDataTransfer::refinement_strategy
const std::function< std::vector< value_type > const typename Triangulation< dim, spacedim >::cell_iterator &parent, const value_type parent_value)> refinement_strategy
Definition: cell_data_transfer.h:175