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
refinement.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2019 - 2023 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
33template <typename Number>
34class Vector;
35
36template <int dim, int spacedim>
38class DoFHandler;
39#endif
40
41
42namespace hp
43{
130 namespace Refinement
131 {
141 template <typename Number>
143 std::function<bool(const Number &, const Number &)>;
144
159 template <int dim, int spacedim>
160 void
162
177 template <int dim, int spacedim>
178 void
180 const std::vector<bool> & p_flags);
181
207 template <int dim, typename Number, int spacedim>
208 void
210 const DoFHandler<dim, spacedim> &dof_handler,
211 const Vector<Number> & criteria,
212 const Number p_refine_threshold,
213 const Number p_coarsen_threshold,
215 &compare_refine = std::greater_equal<Number>(),
217 &compare_coarsen = std::less_equal<Number>());
218
250 template <int dim, typename Number, int spacedim>
251 void
253 const DoFHandler<dim, spacedim> &dof_handler,
254 const Vector<Number> & criteria,
255 const double p_refine_fraction = 0.5,
256 const double p_coarsen_fraction = 0.5,
258 &compare_refine = std::greater_equal<Number>(),
260 &compare_coarsen = std::less_equal<Number>());
261
294 template <int dim, typename Number, int spacedim>
295 void
297 const DoFHandler<dim, spacedim> &dof_handler,
298 const Vector<Number> & criteria,
299 const double p_refine_fraction = 0.5,
300 const double p_coarsen_fraction = 0.5,
302 &compare_refine = std::greater_equal<Number>(),
304 &compare_coarsen = std::less_equal<Number>());
305
332 template <int dim, typename Number, int spacedim>
333 void
335 const Vector<Number> &sobolev_indices);
336
357 template <int dim, typename Number, int spacedim>
358 void
360 const DoFHandler<dim, spacedim> &dof_handler,
361 const Vector<Number> & criteria,
362 const Vector<Number> & references,
364 &compare_refine,
366 &compare_coarsen);
367
596 template <int dim, typename Number, int spacedim>
597 void
598 predict_error(const DoFHandler<dim, spacedim> &dof_handler,
599 const Vector<Number> & error_indicators,
600 Vector<Number> & predicted_errors,
601 const double gamma_p = std::sqrt(0.4),
602 const double gamma_h = 2.,
603 const double gamma_n = 1.);
604
625 template <int dim, int spacedim>
626 void
627 force_p_over_h(const DoFHandler<dim, spacedim> &dof_handler);
628
673 template <int dim, int spacedim>
674 void
675 choose_p_over_h(const DoFHandler<dim, spacedim> &dof_handler);
676
718 template <int dim, int spacedim>
719 bool
721 const unsigned int max_difference = 1,
722 const unsigned int contains_fe_index = 0);
723
727 } // namespace Refinement
728} // namespace hp
729
730
732
733#endif // dealii_hp_refinement_h
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:160
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
void force_p_over_h(const DoFHandler< dim, spacedim > &dof_handler)
void p_adaptivity_from_reference(const DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &criteria, const Vector< Number > &references, const ComparisonFunction< std_cxx20::type_identity_t< Number > > &compare_refine, const ComparisonFunction< std_cxx20::type_identity_t< Number > > &compare_coarsen)
void full_p_adaptivity(const DoFHandler< dim, spacedim > &dof_handler)
Definition refinement.cc:49
void p_adaptivity_from_regularity(const DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &sobolev_indices)
bool limit_p_level_difference(const DoFHandler< dim, spacedim > &dof_handler, const unsigned int max_difference=1, const unsigned int contains_fe_index=0)
void predict_error(const 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.)
void p_adaptivity_from_absolute_threshold(const DoFHandler< dim, spacedim > &dof_handler, const Vector< Number > &criteria, const Number p_refine_threshold, const Number p_coarsen_threshold, const ComparisonFunction< std_cxx20::type_identity_t< Number > > &compare_refine=std::greater_equal< Number >(), const ComparisonFunction< std_cxx20::type_identity_t< Number > > &compare_coarsen=std::less_equal< Number >())
void choose_p_over_h(const DoFHandler< dim, spacedim > &dof_handler)
void p_adaptivity_fixed_number(const 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< std_cxx20::type_identity_t< Number > > &compare_refine=std::greater_equal< Number >(), const ComparisonFunction< std_cxx20::type_identity_t< Number > > &compare_coarsen=std::less_equal< Number >())
std::function< bool(const Number &, const Number &)> ComparisonFunction
Definition refinement.h:143
void p_adaptivity_from_relative_threshold(const 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< std_cxx20::type_identity_t< Number > > &compare_refine=std::greater_equal< Number >(), const ComparisonFunction< std_cxx20::type_identity_t< Number > > &compare_coarsen=std::less_equal< Number >())
void p_adaptivity_from_flags(const DoFHandler< dim, spacedim > &dof_handler, const std::vector< bool > &p_flags)
Definition refinement.cc:68
Definition hp.h:118
typename type_identity< T >::type type_identity_t
Definition type_traits.h:96
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)