From: Krishnakumar Gopalakrishnan Date: Thu, 9 Jan 2020 13:39:40 +0000 (+0000) Subject: Replaces the double-loop in step-3 results extension with just one loop X-Git-Tag: v9.2.0-rc1~710^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9270%2Fhead;p=dealii.git Replaces the double-loop in step-3 results extension with just one loop In step-3, replaces make_grid_and_dofs with just make_grid In Step-3, removes reference to .gnuplot in subsection title in extensions (results) In step-3, minor wording change to convey that the suggested boundary condition code is only slightly longer than before trying to address a comment on indentation by reviewer of PR adding a blank statement after the 'if' line to address reviewer's clarification removes the extra line added in prev commit. Also, changes indentation of the loop code to 2 spaces As per the request of a reviewer, reverts the change made to a sub-heading wherein the .gnuplot was removed --- diff --git a/examples/step-3/doc/results.dox b/examples/step-3/doc/results.dox index 4b6d2a2e3f..1fe4d9547c 100644 --- a/examples/step-3/doc/results.dox +++ b/examples/step-3/doc/results.dox @@ -120,15 +120,12 @@ suggestions: (here 1e-12) of -1 and 1. Try this immediately after calling GridGenerator::hyper_cube(), as before: @code - for (const auto &cell : dof_handler.active_cell_iterators()) - { - for (auto &face : cell->face_iterators()) - if ((std::fabs(face->center()(1) - (-1.0)) < 1e-12) || - (std::fabs(face->center()(1) - (1.0)) < 1e-12)) - face->set_boundary_id(1); - } + for (auto &face : triangulation.active_face_iterators()) + if (std::fabs(face->center()(1) - (-1.0)) < 1e-12 || + std::fabs(face->center()(1) - (1.0)) < 1e-12) + face->set_boundary_id(1); @endcode - Although this code is significantly longer than before, it is useful for + Although this code is a bit longer than before, it is useful for complex geometries, as it does not require knowledge of face labels.
  • @@ -155,7 +152,7 @@ suggestions: 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 + LaplaceProblem::make_grid 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