From: Peter Munch Date: Thu, 22 Jun 2023 20:59:18 +0000 (+0200) Subject: MFTools::categorize_by_boundary_ids: use iterator X-Git-Tag: v9.5.0-rc1~51^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15441%2Fhead;p=dealii.git MFTools::categorize_by_boundary_ids: use iterator --- diff --git a/include/deal.II/matrix_free/tools.h b/include/deal.II/matrix_free/tools.h index f83790bb16..a3b7ac947e 100644 --- a/include/deal.II/matrix_free/tools.h +++ b/include/deal.II/matrix_free/tools.h @@ -378,13 +378,13 @@ namespace MatrixFreeTools unsigned int c_num = 0; for (unsigned int i = 0; i < GeometryInfo::faces_per_cell; ++i) { - auto &face = *cell->face(i); - if (face.at_boundary() && !cell->has_periodic_neighbor(i)) + const auto face = cell->face(i); + if (face->at_boundary() && !cell->has_periodic_neighbor(i)) c_num += factors[i] * (1 + std::distance(bids.begin(), std::find(bids.begin(), bids.end(), - face.boundary_id()))); + face->boundary_id()))); } return c_num; };