Reference documentation for deal.II version 9.5.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\}}\)
Loading...
Searching...
No Matches
cell_data_transfer.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2019 - 2021 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
106template <int dim, int spacedim = dim, typename VectorType = Vector<double>>
108{
109private:
113 using value_type = typename VectorType::value_type;
114
115public:
129 const std::function<std::vector<value_type>(
130 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
131 const value_type parent_value)> refinement_strategy =
132 &AdaptationStrategies::Refinement::preserve<dim, spacedim, value_type>,
133 const std::function<value_type(
134 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
135 const std::vector<value_type> &children_values)> coarsening_strategy =
137 check_equality<dim, spacedim, value_type>);
138
146 void
148
156 void
157 unpack(const VectorType &in, VectorType &out);
158
159private:
166
171 const std::function<std::vector<value_type>(
172 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
173 const value_type parent_value)>
175
180 const std::function<value_type(
181 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
182 const std::vector<value_type> &children_indices)>
184
189 std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
190 const unsigned int>
192
197 std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
198 const unsigned int>
200
206 std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
207 const std::set<unsigned int>>
209
217 unsigned int n_active_cells_pre;
218};
219
220
222
223#endif /* dealii_cell_data_transfer_h */
SmartPointer< const Triangulation< dim, spacedim >, CellDataTransfer< dim, spacedim, VectorType > > triangulation
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()
typename VectorType::value_type value_type
void unpack(const VectorType &in, VectorType &out)
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
std::map< const typename Triangulation< dim, spacedim >::cell_iterator, const std::set< unsigned int > > coarsened_cells_active_index
const std::function< value_type(const typename Triangulation< dim, spacedim >::cell_iterator &parent, const std::vector< value_type > &children_indices)> coarsening_strategy
unsigned int n_active_cells_pre
std::map< const typename Triangulation< dim, spacedim >::cell_iterator, const unsigned int > persisting_cells_active_index
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473