Reference documentation for deal.II version 9.6.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// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2019 - 2023 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_hp_refinement_h
16#define dealii_hp_refinement_h
17
18
19#include <deal.II/base/config.h>
20
22
23#include <functional>
24#include <vector>
25
26
28
29
30// forward declarations
31#ifndef DOXYGEN
32template <typename Number>
33class Vector;
34
35template <int dim, int spacedim>
37class DoFHandler;
38#endif
39
40
41namespace hp
42{
129 namespace Refinement
130 {
140 template <typename Number>
142 std::function<bool(const Number &, const Number &)>;
143
158 template <int dim, int spacedim>
159 void
161
176 template <int dim, int spacedim>
177 void
179 const std::vector<bool> &p_flags);
180
206 template <int dim, typename Number, int spacedim>
207 void
209 const DoFHandler<dim, spacedim> &dof_handler,
210 const Vector<Number> &criteria,
211 const Number p_refine_threshold,
212 const Number p_coarsen_threshold,
214 &compare_refine = std::greater_equal<Number>(),
216 &compare_coarsen = std::less_equal<Number>());
217
249 template <int dim, typename Number, int spacedim>
250 void
252 const DoFHandler<dim, spacedim> &dof_handler,
253 const Vector<Number> &criteria,
254 const double p_refine_fraction = 0.5,
255 const double p_coarsen_fraction = 0.5,
257 &compare_refine = std::greater_equal<Number>(),
259 &compare_coarsen = std::less_equal<Number>());
260
293 template <int dim, typename Number, int spacedim>
294 void
296 const DoFHandler<dim, spacedim> &dof_handler,
297 const Vector<Number> &criteria,
298 const double p_refine_fraction = 0.5,
299 const double p_coarsen_fraction = 0.5,
301 &compare_refine = std::greater_equal<Number>(),
303 &compare_coarsen = std::less_equal<Number>());
304
331 template <int dim, typename Number, int spacedim>
332 void
334 const Vector<Number> &sobolev_indices);
335
356 template <int dim, typename Number, int spacedim>
357 void
359 const DoFHandler<dim, spacedim> &dof_handler,
360 const Vector<Number> &criteria,
361 const Vector<Number> &references,
363 &compare_refine,
365 &compare_coarsen);
366
595 template <int dim, typename Number, int spacedim>
596 void
597 predict_error(const DoFHandler<dim, spacedim> &dof_handler,
598 const Vector<Number> &error_indicators,
599 Vector<Number> &predicted_errors,
600 const double gamma_p = std::sqrt(0.4),
601 const double gamma_h = 2.,
602 const double gamma_n = 1.);
603
624 template <int dim, int spacedim>
625 void
626 force_p_over_h(const DoFHandler<dim, spacedim> &dof_handler);
627
672 template <int dim, int spacedim>
673 void
674 choose_p_over_h(const DoFHandler<dim, spacedim> &dof_handler);
675
717 template <int dim, int spacedim>
718 bool
720 const unsigned int max_difference = 1,
721 const unsigned int contains_fe_index = 0);
722
726 } // namespace Refinement
727} // namespace hp
728
729
731
732#endif // dealii_hp_refinement_h
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:503
#define DEAL_II_CXX20_REQUIRES(condition)
Definition config.h:177
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:504
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:141
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:117
typename type_identity< T >::type type_identity_t
Definition type_traits.h:95
::VectorizedArray< Number, width > sqrt(const ::VectorizedArray< Number, width > &)