Reference documentation for deal.II version 9.1.1
\(\newcommand{\dealcoloneq}{\mathrel{\vcenter{:}}=}\)
cell_weights.h
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2018 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_distributed_cell_weights_h
17 #define dealii_distributed_cell_weights_h
18 
19 #include <deal.II/base/config.h>
20 
21 #include <deal.II/distributed/tria_base.h>
22 
23 #include <deal.II/hp/dof_handler.h>
24 
25 
26 DEAL_II_NAMESPACE_OPEN
27 
28 namespace parallel
29 {
80  template <int dim, int spacedim = dim>
82  {
83  public:
90  CellWeights(const ::hp::DoFHandler<dim, spacedim> &dof_handler);
91 
95  ~CellWeights();
96 
100  void
101  register_constant_weighting(const unsigned int factor = 1000);
102 
107  void
108  register_ndofs_weighting(const unsigned int factor = 1000);
109 
114  void
115  register_ndofs_squared_weighting(const unsigned int factor = 1000);
116 
129  void
131  const std::function<unsigned int(
134  custom_function);
135 
136  private:
142 
152 
164  std::function<unsigned int(
168 
172  boost::signals2::connection tria_listener;
173 
180  unsigned int
182  const typename Triangulation<dim, spacedim>::cell_iterator &cell,
183  const typename Triangulation<dim, spacedim>::CellStatus status);
184  };
185 } // namespace parallel
186 
187 
188 DEAL_II_NAMESPACE_CLOSE
189 
190 #endif
void register_ndofs_weighting(const unsigned int factor=1000)
Definition: cell_weights.cc:78
SmartPointer< const parallel::Triangulation< dim, spacedim >, CellWeights > triangulation
Definition: cell_weights.h:151
std::function< unsigned int(const FiniteElement< dim, spacedim > &, const typename hp::DoFHandler< dim, spacedim >::cell_iterator &)> weighting_function
Definition: cell_weights.h:167
CellWeights(const ::hp::DoFHandler< dim, spacedim > &dof_handler)
Definition: cell_weights.cc:27
typename ActiveSelector::cell_iterator cell_iterator
Definition: dof_handler.h:316
boost::signals2::connection tria_listener
Definition: cell_weights.h:172
unsigned int weight_callback(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename Triangulation< dim, spacedim >::CellStatus status)
void register_ndofs_squared_weighting(const unsigned int factor=1000)
Definition: cell_weights.cc:90
SmartPointer< const ::hp::DoFHandler< dim, spacedim >, CellWeights > dof_handler
Definition: cell_weights.h:141
void register_constant_weighting(const unsigned int factor=1000)
Definition: cell_weights.cc:66
void register_custom_weighting(const std::function< unsigned int(const FiniteElement< dim, spacedim > &, const typename hp::DoFHandler< dim, spacedim >::cell_iterator &)> custom_function)