From a8394928e89cc0e7e9d22ef959a060f139ed3e97 Mon Sep 17 00:00:00 2001 From: Peter Munch Date: Thu, 22 Jun 2023 22:59:18 +0200 Subject: [PATCH] MFTools::categorize_by_boundary_ids: use iterator --- include/deal.II/matrix_free/tools.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; }; -- 2.39.5