From 52ead5782c3dbef23a3211a55f7504f269903451 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 17 May 2009 12:09:59 +0000 Subject: [PATCH] List one additional possibility for extensions. git-svn-id: https://svn.dealii.org/trunk@18858 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-3/doc/results.dox | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/deal.II/examples/step-3/doc/results.dox b/deal.II/examples/step-3/doc/results.dox index 7775694464..9a88ce9cfd 100644 --- a/deal.II/examples/step-3/doc/results.dox +++ b/deal.II/examples/step-3/doc/results.dox @@ -143,4 +143,46 @@ suggestions: computed for boundary indicator 0. The result will be that we will get discontinuous boundary values, zero on three sides of the square, and one on the fourth. + +
  • + Observe convergence: We will only discuss computing errors in norms in + @ref step_7 "step-7", but it is easy to check that computations converge + already here. For example, we could evaluate the value of the solution in a + single point and compare the value for different %numbers of global + refinement (the number of global refinement steps is set in + LaplaceProblem::make_grid_and_dofs above). To evaluate the + solution at a point, say at $(\frac 13, \frac 13)$, we could add the + following code to the LaplaceProblem::output_results function: + @code + std::cout << "Solution at (1/3,1/3): " + << VectorTools::point_value (dof_handler, solution, + Point<2>(1./3, 1./3)) + << std::endl; + @endcode + For 1 through 8 global refinement steps, we then get the following sequence + of point values: + + + + + + + + + + + +
    # of refinements $u_h(\frac 13,\frac13)$
    1 0.166667
    2 0.227381
    3 0.237375
    4 0.240435
    5 0.241140
    6 0.241324
    7 0.241369
    8 0.241380
    9 0.241383
    + By noticing that the difference between each two consecutive values reduces + by about a factor of 4, we can conjecture that the "correct" value may be + $u(\frac 13, \frac 13)\approx 0.241384$. In fact, if we assumed this to be + the correct value, we could show that the sequence above indeed shows ${\cal + O}(h^2)$ convergence — theoretically, the convergence order should be + ${\cal O}(h^2 |\log h|)$ but the symmetry of the domain and the mesh may lead + to the better convergence order observed. + + A slight variant of this would be to repeat the test with quadratic + elements. All you need to do is to set the polynomial degree of the finite + element to two in the constructor + LaplaceProblem::LaplaceProblem. -- 2.39.5