From: Wolfgang Bangerth Date: Sun, 17 May 2009 12:46:13 +0000 (+0000) Subject: Add another possibility for extensions. X-Git-Tag: v8.0.0~7676 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20c95d7819a9e79b84eb3fbea43ab3eace2d7d97;p=dealii.git Add another possibility for extensions. git-svn-id: https://svn.dealii.org/trunk@18861 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/examples/step-3/doc/results.dox b/deal.II/examples/step-3/doc/results.dox index 9a88ce9cfd..18acda4115 100644 --- a/deal.II/examples/step-3/doc/results.dox +++ b/deal.II/examples/step-3/doc/results.dox @@ -159,7 +159,7 @@ suggestions: Point<2>(1./3, 1./3)) << std::endl; @endcode - For 1 through 8 global refinement steps, we then get the following sequence + For 1 through 9 global refinement steps, we then get the following sequence of point values: @@ -185,4 +185,35 @@ suggestions: elements. All you need to do is to set the polynomial degree of the finite element to two in the constructor LaplaceProblem::LaplaceProblem. + +
  • Convergence of the mean: A different way to see that the solution + actually converges (to something &mdash we can't tell whether it's really + the correct value!) is to compute the mean of the solution. To this end, add + the following code to LaplaceProblem::output_results: + @code + std::cout << "Mean value: " + << VectorTools::compute_mean_value (dof_handler, + QGauss<2>(3), + solution, + 0) + << std::endl; + @endcode + The documentation of the function explains what the second and fourth + parameters mean, while the first and third should be obvious. Doing the same + study again where we change the number of global refinement steps, we get + the following result: +
  • # of refinements $u_h(\frac 13,\frac13)$
    + + + + + + + + + + +
    # of refinements $\int_\Omega u_h(x)\; dx$
    1 0.093750
    2 0.127902
    3 0.139761
    4 0.139761
    5 0.140373
    6 0.140526
    7 0.140564
    8 0.140574
    9 0.140576
    + Again, the difference between two adjacent values goes down by about a + factor of four, indicating convergence as ${\cal O}(h^2)$.