From 1c7adcd587b5a8af5d4d90e040a4c39a3b431233 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Sat, 14 Apr 2018 16:14:07 +0000 Subject: [PATCH] Fixed JPs comments. --- include/deal.II/grid/grid_tools.h | 6 +++--- source/grid/grid_tools.cc | 22 +++++++++++----------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index ee6722b4b1..49e9c23fcd 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -2273,14 +2273,14 @@ namespace GridTools * Map the given boundary ids to the given manifold ids on faces and * edges at the boundary. * - * This function copies the boundary_ids of the boundary faces and + * This function copies the boundary ids of the boundary faces and * edges that are present in the parameter @p src_boundary_ids to * the corresponding manifold_id in @p dst_manifold_ids, of the same * faces and edges. * * If the optional parameter @p reset_boundary_ids is non empty, * each boundary id in @p src_boundary_ids, is replaced with the - * corresponding boudnary id in @p reset_boundary_ids. + * corresponding boundary id in @p reset_boundary_ids. * * An exception is thrown if the size of the input vectors do not * match. If a boundary id indicated in @p src_boundary_ids is not @@ -2296,7 +2296,7 @@ namespace GridTools void map_boundary_to_manifold_ids(const std::vector &src_boundary_ids, const std::vector &dst_manifold_ids, Triangulation &tria, - const std::vector &reset_boundary_ids= {}); + const std::vector &reset_boundary_ids = {}); /** * Copy material ids to manifold ids. The default manifold_id for new diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index 55d4267fb2..be39c27e8b 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -3273,11 +3273,11 @@ next_cell: cell != tria.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->face(f)->at_boundary()) - for (signed int e=0; e(GeometryInfo::lines_per_face); ++e) + for (unsigned int e=0; e::lines_per_face; ++e) { - auto bid = cell->face(f)->line(e)->boundary_id(); - auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)- - src_boundary_ids.begin(); + const auto bid = cell->face(f)->line(e)->boundary_id(); + const auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)- + src_boundary_ids.begin(); if ((unsigned int)ind < src_boundary_ids.size()) cell->face(f)->line(e)->set_manifold_id(dst_manifold_ids[ind]); } @@ -3289,9 +3289,9 @@ next_cell: for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->face(f)->at_boundary()) { - auto bid = cell->face(f)->boundary_id(); - auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)- - src_boundary_ids.begin(); + const auto bid = cell->face(f)->boundary_id(); + const auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)- + src_boundary_ids.begin(); if ((unsigned int)ind < src_boundary_ids.size()) { @@ -3302,11 +3302,11 @@ next_cell: } if (dim >= 3) - for (signed int e=0; e(GeometryInfo::lines_per_face); ++e) + for (unsigned int e=0; e::lines_per_face; ++e) { - auto bid = cell->face(f)->line(e)->boundary_id(); - auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)- - src_boundary_ids.begin(); + const auto bid = cell->face(f)->line(e)->boundary_id(); + const auto ind = std::find(src_boundary_ids.begin(), src_boundary_ids.end(), bid)- + src_boundary_ids.begin(); if ((unsigned int)ind < src_boundary_ids.size()) cell->face(f)->line(e)->set_boundary_id(reset_boundary_ids[ind]); } -- 2.39.5