From 188d1ff60c3f9f93a530e79a1109cc768ff80dce Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 24 Apr 2002 08:00:08 +0000 Subject: [PATCH] Add another paragraph. git-svn-id: https://svn.dealii.org/trunk@5721 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/examples/step-13/step-13.cc | 43 +++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/deal.II/examples/step-13/step-13.cc b/deal.II/examples/step-13/step-13.cc index 35124c9449..5065240e72 100644 --- a/deal.II/examples/step-13/step-13.cc +++ b/deal.II/examples/step-13/step-13.cc @@ -439,7 +439,7 @@ namespace Evaluation // that were not so we could not // give a reasonable value of the // solution there and the rest of - // the computation were useless + // the computations were useless // anyway. So make sure through // the ``AssertThrow'' macro // already used in the step-9 @@ -469,11 +469,42 @@ namespace Evaluation // wrong. AssertThrow (evaluation_point_found, ExcEvaluationPointNotFound(evaluation_point)); - - // If we are sure that we have - // found the evaluation point, we - // can add the results into the - // table of results: + // Note that we have used the + // ``Assert'' macro in other + // example programs as well. It + // differed from the + // ``AssertThrow'' macro used + // here in that it simply aborts + // the program, rather than + // throwing an exception, and + // that it did so only in debug + // mode. It was the right macro + // to use to check about the size + // of vectors passed as arguments + // to functions, and the like. + // + // However, here the situation is + // different: whether we find the + // evaluation point or not may + // change from refinement to + // refinement (for example, if + // the four cells around point + // are coarsened away, then the + // point may vanish after + // refinement and + // coarsening). This is something + // that cannot be predicted from + // a few number of runs of the + // program in debug mode, but + // should be checked always, also + // in production runs. Thus the + // use of the ``AssertThrow'' + // macro here. + + // Now, if we are sure that we + // have found the evaluation + // point, we can add the results + // into the table of results: results_table.add_value ("DoFs", dof_handler.n_dofs()); results_table.add_value ("u(x_0)", point_value); }; -- 2.39.5