smoothness of the finite element approximation. Further, we flag certain fractions of
cells with the highest and lowest errors for refinement and coarsening, respectively
(here: 30\%/3\%). From those cells listed for adaptation, we designate a subset
-for $h$- and $p$-adaptation (here: 10\%/90\%).
+for $h$- and $p$-adaptation (here: 10\%/90\%). The parameters of the corresponding
+\texttt{hp::Refinement} function specify the fraction of cells to be $p$-adapted from
+those subsets flagged for refinement and coarsening, respectively.
\begin{c++}
-Vector<float> estimated_error_per_cell (n_active_cells);
+Vector<float> estimated_error_per_cell(n_active_cells);
KellyErrorEstimator::estimate(
dof_handler, ..., solution, estimated_error_per_cell, ...);
GridRefinement::refine_and_coarsen_fixed_number(
triangulation, estimated_error_per_cell, 0.3, 0.03);
-Vector<float> estimated_smoothness_per_cell (n_active_cells);
+Vector<float> estimated_smoothness_per_cell(n_active_cells);
SmoothnessEstimator::Legendre::coefficient_decay(
..., dof_handler, solution, estimated_smoothness_per_cell);
hp::Refinement::p_adaptivity_fixed_number(
dof_handler, estimated_smoothness_per_cell, 0.9, 0.9);
-hp::Refinement::choose_p_over_h (dof_handler);
+hp::Refinement::choose_p_over_h(dof_handler);
triangulation.execute_coarsening_and_refinement();
\end{c++}
coarsening in terms of $h$- and $p$-adaptation in serial and parallel applications.
The former relies on knowing an estimate for the upper error bound \cite[Thm.~3.4]{BabuskaSuri1990}.
-For successive refinements, we can predict how the error will change
-based on
+For successive refinements, we can predict how the error will change based on
current error estimates and adaptation flags. In the next refinement cycle, these
predicted error estimates allow us to decide whether the choice of adaptation in
the previous cycle was justified, and provide a criterion for the choice in the next