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\}}\)
refinement.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_hp_refinement_h
17 #define dealii_hp_refinement_h
18 
19 
20 #include <deal.II/base/config.h>
21 
23 
24 #include <functional>
25 #include <vector>
26 
27 
29 
30 
31 // forward declarations
32 #ifndef DOXYGEN
33 template <typename Number>
34 class Vector;
35 
36 namespace hp
37 {
38  template <int dim, int spacedim>
39  class DoFHandler;
40 }
41 #endif
42 
43 
44 namespace hp
45 {
130  namespace Refinement
131  {
141  template <typename Number>
142  using ComparisonFunction =
143  std::function<bool(const Number &, const Number &)>;
144 
158  template <int dim, int spacedim>
159  void
161 
175  template <int dim, int spacedim>
176  void
178  const std::vector<bool> & p_flags);
179 
204  template <int dim, typename Number, int spacedim>
205  void
207  const hp::DoFHandler<dim, spacedim> &dof_handler,
208  const Vector<Number> & criteria,
209  const Number p_refine_threshold,
210  const Number p_coarsen_threshold,
212  &compare_refine = std::greater_equal<Number>(),
214  &compare_coarsen = std::less_equal<Number>());
215 
246  template <int dim, typename Number, int spacedim>
247  void
249  const hp::DoFHandler<dim, spacedim> &dof_handler,
250  const Vector<Number> & criteria,
251  const double p_refine_fraction = 0.5,
252  const double p_coarsen_fraction = 0.5,
254  &compare_refine = std::greater_equal<Number>(),
256  &compare_coarsen = std::less_equal<Number>());
257 
289  template <int dim, typename Number, int spacedim>
290  void
292  const hp::DoFHandler<dim, spacedim> &dof_handler,
293  const Vector<Number> & criteria,
294  const double p_refine_fraction = 0.5,
295  const double p_coarsen_fraction = 0.5,
297  &compare_refine = std::greater_equal<Number>(),
299  &compare_coarsen = std::less_equal<Number>());
300 
326  template <int dim, typename Number, int spacedim>
327  void
329  const hp::DoFHandler<dim, spacedim> &dof_handler,
330  const Vector<Number> & sobolev_indices);
331 
351  template <int dim, typename Number, int spacedim>
352  void
354  const hp::DoFHandler<dim, spacedim> & dof_handler,
355  const Vector<Number> & criteria,
356  const Vector<Number> & references,
357  const ComparisonFunction<typename identity<Number>::type> &compare_refine,
359  &compare_coarsen);
561  template <int dim, typename Number, int spacedim>
562  void
563  predict_error(const hp::DoFHandler<dim, spacedim> &dof_handler,
564  const Vector<Number> & error_indicators,
565  Vector<Number> & predicted_errors,
566  const double gamma_p = std::sqrt(0.4),
567  const double gamma_h = 2.,
568  const double gamma_n = 1.);
569 
589  template <int dim, int spacedim>
590  void
591  force_p_over_h(const hp::DoFHandler<dim, spacedim> &dof_handler);
592 
636  template <int dim, int spacedim>
637  void
639 
643  } // namespace Refinement
644 } // namespace hp
645 
646 
648 
649 #endif // dealii_hp_refinement_h
identity::type
T type
Definition: template_constraints.h:270
LinearAlgebraDealII::Vector
Vector< double > Vector
Definition: generic_linear_algebra.h:43
hp::Refinement::p_adaptivity_from_relative_threshold
void p_adaptivity_from_relative_threshold(const hp::DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &criteria, const double p_refine_fraction=0.5, const double p_coarsen_fraction=0.5, const ComparisonFunction< typename identity< Number >::type > &compare_refine=std::greater_equal< Number >(), const ComparisonFunction< typename identity< Number >::type > &compare_coarsen=std::less_equal< Number >())
Definition: refinement.cc:123
hp::Refinement::p_adaptivity_from_regularity
void p_adaptivity_from_regularity(const hp::DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &sobolev_indices)
Definition: refinement.cc:407
hp::DoFHandler
Definition: dof_handler.h:203
hp::Refinement::predict_error
void predict_error(const hp::DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &error_indicators, Vector< Number > &predicted_errors, const double gamma_p=std::sqrt(0.4), const double gamma_h=2., const double gamma_n=1.)
Definition: refinement.cc:494
DoFHandler
Definition: dof_handler.h:205
bool
hp::Refinement::full_p_adaptivity
void full_p_adaptivity(const hp::DoFHandler< dim, spacedim > &dof_handler)
Definition: refinement.cc:43
hp::Refinement::ComparisonFunction
std::function< bool(const Number &, const Number &)> ComparisonFunction
Definition: refinement.h:143
hp::Refinement::p_adaptivity_from_flags
void p_adaptivity_from_flags(const hp::DoFHandler< dim, spacedim > &dof_handler, const std::vector< bool > &p_flags)
Definition: refinement.cc:55
DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:358
hp::Refinement::choose_p_over_h
void choose_p_over_h(const hp::DoFHandler< dim, spacedim > &dof_handler)
Definition: refinement.cc:636
hp::Refinement::p_adaptivity_fixed_number
void p_adaptivity_fixed_number(const hp::DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &criteria, const double p_refine_fraction=0.5, const double p_coarsen_fraction=0.5, const ComparisonFunction< typename identity< Number >::type > &compare_refine=std::greater_equal< Number >(), const ComparisonFunction< typename identity< Number >::type > &compare_coarsen=std::less_equal< Number >())
Definition: refinement.cc:213
hp
Definition: hp.h:117
hp::Refinement::p_adaptivity_from_absolute_threshold
void p_adaptivity_from_absolute_threshold(const hp::DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &criteria, const Number p_refine_threshold, const Number p_coarsen_threshold, const ComparisonFunction< typename identity< Number >::type > &compare_refine=std::greater_equal< Number >(), const ComparisonFunction< typename identity< Number >::type > &compare_coarsen=std::less_equal< Number >())
Definition: refinement.cc:91
hp::Refinement::p_adaptivity_from_reference
void p_adaptivity_from_reference(const hp::DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &criteria, const Vector< Number > &references, const ComparisonFunction< typename identity< Number >::type > &compare_refine, const ComparisonFunction< typename identity< Number >::type > &compare_coarsen)
Definition: refinement.cc:458
hp::Refinement::force_p_over_h
void force_p_over_h(const hp::DoFHandler< dim, spacedim > &dof_handler)
Definition: refinement.cc:622
template_constraints.h
config.h
DEAL_II_NAMESPACE_CLOSE
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:359