From 6b58c81bf30764eb03a5dccdd8d0bb11f0f296d7 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 28 Aug 2024 09:51:05 -0600 Subject: [PATCH] Reserve the necessary amount of space. --- include/deal.II/lac/affine_constraints.templates.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index d9ca0f1ff2..b95bf0c216 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -446,6 +446,7 @@ namespace internal IndexSet constrained_indices(locally_owned_dofs.size()); std::vector constrained_indices_temp; + constrained_indices_temp.reserve(constraints_in.n_constraints()); for (const auto &line : constraints_in.get_lines()) constrained_indices_temp.push_back(line.index); std::sort(constrained_indices_temp.begin(), constrained_indices_temp.end()); -- 2.39.5