deal.II version GIT relicensing-2165-gc91f007519 2024-11-20 01:40:00+00:00
\(\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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2019 - 2021 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
15#ifndef dealii_cell_data_transfer_h
16#define dealii_cell_data_transfer_h
17
18#include <deal.II/base/config.h>
19
21
22#include <deal.II/grid/tria.h>
23
25
26#include <algorithm>
27#include <functional>
28#include <set>
29
30
32
105template <int dim, int spacedim = dim, typename VectorType = Vector<double>>
107{
108private:
112 using value_type = typename VectorType::value_type;
113
114public:
128 const std::function<std::vector<value_type>(
129 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
130 const value_type parent_value)> refinement_strategy =
131 &AdaptationStrategies::Refinement::preserve<dim, spacedim, value_type>,
132 const std::function<value_type(
133 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
134 const std::vector<value_type> &children_values)> coarsening_strategy =
136 check_equality<dim, spacedim, value_type>);
137
145 void
147
155 void
156 unpack(const VectorType &in, VectorType &out);
157
158private:
165
170 const std::function<std::vector<value_type>(
171 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
172 const value_type parent_value)>
174
179 const std::function<value_type(
180 const typename Triangulation<dim, spacedim>::cell_iterator &parent,
181 const std::vector<value_type> &children_indices)>
183
188 std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
189 const unsigned int>
191
196 std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
197 const unsigned int>
199
205 std::map<const typename Triangulation<dim, spacedim>::cell_iterator,
206 const std::set<unsigned int>>
208
216 unsigned int n_active_cells_pre;
217};
218
219
221
222#endif /* dealii_cell_data_transfer_h */
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
ObserverPointer< const Triangulation< dim, spacedim >, CellDataTransfer< dim, spacedim, VectorType > > triangulation
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:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499