From: Krishnakumar Gopalakrishnan Date: Fri, 17 Jan 2020 18:30:22 +0000 (+0000) Subject: Documentation: Simplify example code for boundary_id and manifold_id X-Git-Tag: v9.2.0-rc1~560^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d730d8ca7d51cf5117a83ebcb61714a6bcd2f9e;p=dealii.git Documentation: Simplify example code for boundary_id and manifold_id This commit simplifies and modernizes a code snippet in the glossary entries of boundary_id and manifold_id In reference to #9320 --- diff --git a/doc/doxygen/headers/glossary.h b/doc/doxygen/headers/glossary.h index 8c6d886b45..631b410fb6 100644 --- a/doc/doxygen/headers/glossary.h +++ b/doc/doxygen/headers/glossary.h @@ -327,14 +327,10 @@ * this, here setting the boundary indicator to 42 for all faces located at * $x=-1$: * @code - * for (typename Triangulation::active_cell_iterator - * cell = triangulation.begin_active(); - * cell != triangulation.end(); - * ++cell) - * for (unsigned int f=0; f::faces_per_cell; ++f) - * if (cell->face(f)->at_boundary()) - * if (cell->face(f)->center()[0] == -1) - * cell->face(f)->set_boundary_id (42); + * for (auto &face : triangulation.active_face_iterators()) + * if (face->at_boundary()) + * if (face->center()[0] == -1) + * face->set_boundary_id (42); * @endcode * This calls functions TriaAccessor::set_boundary_id. In 3d, it may * also be appropriate to call TriaAccessor::set_all_boundary_ids instead @@ -1273,9 +1269,7 @@ * center has an $x$ component less than zero: * * @code - * for (typename Triangulation::active_cell_iterator cell = - * triangulation.begin_active(); - * cell != triangulation.end(); ++cell) + * for (auto &cell : triangulation.active_cell_iterators()) * if (cell->center()[0] < 0) * cell->set_manifold_id (42); * @endcode