deal.II version GIT relicensing-2171-g98af52917d 2024-11-23 14: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_weights.h
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2018 - 2024 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_distributed_cell_weights_h
16#define dealii_distributed_cell_weights_h
17
18#include <deal.II/base/config.h>
19
21
23
24
26
27namespace parallel
28{
102 template <int dim, int spacedim = dim>
104 {
105 public:
116 using WeightingFunction = std::function<
117 unsigned int(const typename DoFHandler<dim, spacedim>::cell_iterator &,
119
125 CellWeights() = default;
126
135 CellWeights(const DoFHandler<dim, spacedim> &dof_handler,
136 const WeightingFunction &weighting_function);
137
143 ~CellWeights();
144
151 void
152 reinit(const DoFHandler<dim, spacedim> &dof_handler,
153 const WeightingFunction &weighting_function);
154
163 static std::function<unsigned int(
164 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
165 const CellStatus status)>
167 const WeightingFunction &weighting_function);
168
177 static WeightingFunction
178 constant_weighting(const unsigned int factor = 1);
179
189 static WeightingFunction
190 ndofs_weighting(const std::pair<float, float> &coefficients);
191
201 static WeightingFunction
202 ndofs_weighting(const std::vector<std::pair<float, float>> &coefficients);
203
208 private:
213 boost::signals2::connection connection;
214
222 static unsigned int
224 const typename ::Triangulation<dim, spacedim>::cell_iterator &cell,
225 const CellStatus status,
226 const DoFHandler<dim, spacedim> &dof_handler,
228 const WeightingFunction &weighting_function);
229 };
230} // namespace parallel
231
232
234
235#endif
CellStatus
Definition cell_status.h:31
static unsigned int weighting_callback(const typename ::Triangulation< dim, spacedim >::cell_iterator &cell, const CellStatus status, const DoFHandler< dim, spacedim > &dof_handler, const parallel::TriangulationBase< dim, spacedim > &triangulation, const WeightingFunction &weighting_function)
static WeightingFunction constant_weighting(const unsigned int factor=1)
std::function< unsigned int(const typename DoFHandler< dim, spacedim >::cell_iterator &, const FiniteElement< dim, spacedim > &)> WeightingFunction
static WeightingFunction ndofs_weighting(const std::pair< float, float > &coefficients)
void reinit(const DoFHandler< dim, spacedim > &dof_handler, const WeightingFunction &weighting_function)
static std::function< unsigned int(const typename ::Triangulation< dim, spacedim >::cell_iterator &cell, const CellStatus status)> make_weighting_callback(const DoFHandler< dim, spacedim > &dof_handler, const WeightingFunction &weighting_function)
boost::signals2::connection connection
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:498
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:499
typename ActiveSelector::cell_iterator cell_iterator
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation