]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Reserve the necessary amount of space. 17624/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 28 Aug 2024 15:51:05 +0000 (09:51 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 28 Aug 2024 15:51:05 +0000 (09:51 -0600)
include/deal.II/lac/affine_constraints.templates.h

index d9ca0f1ff2f21715d4f31787626d9363026a2753..b95bf0c2161524b41f59ef850557567ab0838139 100644 (file)
@@ -446,6 +446,7 @@ namespace internal
     IndexSet constrained_indices(locally_owned_dofs.size());
 
     std::vector<types::global_dof_index> 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());

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.