From 54068a1999303189767f5647b213019ac446230a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 8 Oct 2015 16:14:20 -0500 Subject: [PATCH] Minor updates to the documentation of step-7. This implements suggestions by Hung-Chieh Chu. --- examples/step-7/doc/results.dox | 6 ++++-- examples/step-7/step-7.cc | 10 +++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/examples/step-7/doc/results.dox b/examples/step-7/doc/results.dox index 1ba7d38af0..e5fbede05b 100644 --- a/examples/step-7/doc/results.dox +++ b/examples/step-7/doc/results.dox @@ -14,7 +14,9 @@ here: Secondly, the program writes tables not only to disk, but also to the -screen while running: +screen while running. The output looks like the following (recall that +columns labeled as "H1" actually show the $H^1$ semi-norm +of the error, not the full $H^1$ norm): @code @@ -174,7 +176,7 @@ cycle cells dofs L2 H1 Linfty One can see the error reduction upon grid refinement, and for the cases where global refinement was performed, also the convergence rates can be seen. The linear and quadratic convergence rates of Q1 -and Q2 elements in the $H^1$ norm can clearly be seen, as +and Q2 elements in the $H^1$ semi-norm can clearly be seen, as are the quadratic and cubic rates in the $L_2$ norm. diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index 99c677258d..76141dec84 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -163,7 +163,7 @@ namespace Step7 // // The actual classes are declared in the following. Note that in order to // compute the error of the numerical solution against the continuous one in - // the L2 and H1 norms, we have to provide value and gradient of the exact + // the L2 and H1 (semi-)norms, we have to provide value and gradient of the exact // solution. This is more than we have done in previous examples, where all // we provided was the value at one or a list of points. Fortunately, the // Function class also has virtual functions for the gradient, so we can @@ -833,7 +833,7 @@ namespace Step7 // @sect4{HelmholtzProblem::process_solution} // Finally we want to process the solution after it has been computed. For - // this, we integrate the error in various norms, and we generate tables + // this, we integrate the error in various (semi-)norms, and we generate tables // that will later be used to display the convergence against the continuous // solution in a nice format. template @@ -871,7 +871,11 @@ namespace Step7 // By same procedure we get the H1 semi-norm. We re-use the // difference_per_cell vector since it is no longer used - // after computing the L2_error variable above. + // after computing the L2_error variable above. The global + // $H^1$ semi-norm error is then computed by taking the sum of squares + // of the errors on each individual cell, and then the square root of + // it -- an operation that conveniently again coincides with taking + // the $l_2$ norm of the vector of error indicators. VectorTools::integrate_difference (dof_handler, solution, Solution(), -- 2.39.5