Number of constraints : 756
Cycle 2:
Number of active cells : 927
- Number of degrees of freedom: 7978
- Number of constraints : 1760
+ Number of degrees of freedom: 8226
+ Number of constraints : 1856
Cycle 3:
- Number of active cells : 1020
- Number of degrees of freedom: 11750
- Number of constraints : 2898
+ Number of active cells : 978
+ Number of degrees of freedom: 12146
+ Number of constraints : 2944
Cycle 4:
- Number of active cells : 1158
- Number of degrees of freedom: 16342
- Number of constraints : 3892
+ Number of active cells : 1104
+ Number of degrees of freedom: 16892
+ Number of constraints : 3998
Cycle 5:
- Number of active cells : 1197
- Number of degrees of freedom: 20569
- Number of constraints : 4954
+ Number of active cells : 1149
+ Number of degrees of freedom: 22078
+ Number of constraints : 5230
@endcode
The first thing we learn from this is that the number of constrained degrees
<div class="threecolumn" style="width: 80%">
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-mesh-00.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.mesh-00.svg"
alt="Triangulation containing reentrant corners without adaptive refinement."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-mesh-01.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.mesh-01.svg"
alt="Triangulation containing reentrant corners with one level of
refinement. New cells are placed near the corners."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-mesh-02.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.mesh-02.svg"
alt="Triangulation containing reentrant corners with two levels of
refinement. New cells are placed near the corners."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-mesh-03.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.mesh-03.svg"
alt="Triangulation containing reentrant corners with three levels of
refinement. New cells are placed near the corners."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-mesh-04.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.mesh-04.svg"
alt="Triangulation containing reentrant corners with four levels of
refinement. New cells are placed near the corners."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-mesh-05.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.mesh-05.svg"
alt="Triangulation containing reentrant corners with five levels of
refinement. New cells are placed near the corners."
width="200" height="200">
<div class="threecolumn" style="width: 80%">
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-fe_degree-00.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.fe_degree-00.svg"
alt="Initial grid where all cells contain just biquadratic functions."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-fe_degree-01.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.fe_degree-01.svg"
alt="Depiction of local approximation degrees after one refinement."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-fe_degree-02.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.fe_degree-02.svg"
alt="Depiction of local approximation degrees after two refinements."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-fe_degree-03.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.fe_degree-03.svg"
alt="Depiction of local approximation degrees after three refinements."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-fe_degree-04.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.fe_degree-04.svg"
alt="Depiction of local approximation degrees after four refinements."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-fe_degree-05.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.fe_degree-05.svg"
alt="Depiction of local approximation degrees after five refinements."
width="200" height="200">
</div>
<div class="threecolumn" style="width: 80%">
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-smoothness-00.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.smoothness-00.svg"
alt="Estimated regularity per cell on the initial grid."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-smoothness-01.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.smoothness-01.svg"
alt="Depiction of the estimated regularity per cell after one refinement."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-smoothness-02.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.smoothness-02.svg"
alt="Depiction of the estimated regularity per cell after two refinements."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-smoothness-03.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.smoothness-03.svg"
alt="Depiction of the estimated regularity per cell after three refinements."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-smoothness-04.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.smoothness-04.svg"
alt="Depiction of the estimated regularity per cell after four refinements."
width="200" height="200">
</div>
<div>
- <img src="https://www.dealii.org/images/steps/developer/step-27-smoothness-05.svg"
+ <img src="https://www.dealii.org/images/steps/developer/step-27.smoothness-05.svg"
alt="Depiction of the estimated regularity per cell after five refinements."
width="200" height="200">
</div>
// not both at once.
hp::Refinement::choose_p_over_h(dof_handler);
+ // For grid adaptive refinement, we ensure a 2:1 mesh balance by limiting
+ // the difference of refinement levels of neighboring cells to one by
+ // calling Triangulation::prepare_coarsening_and_refinement(). We would
+ // like to achieve something similar for the p-levels of neighboring
+ // cells: levels of future finite elements are not allowed to differ by
+ // more than a specified difference. With its default parameters, a call
+ // of hp::Refinement::limit_p_level_difference() ensures that their level
+ // difference is limited to one. This will not necessarily decrease the
+ // number of hanging nodes in the domain, but makes sure that high order
+ // polynomials are not constrained to much lower polynomials on faces,
+ // e.g., fifth order to second order polynomials.
+ triangulation.prepare_coarsening_and_refinement();
+ hp::Refinement::limit_p_level_difference(dof_handler);
+
// At the end of this procedure, we then refine the mesh. During this
// process, children of cells undergoing bisection inherit their mother
// cell's finite element index. Further, future finite element indices