From: bangerth Date: Wed, 27 Sep 2006 16:48:04 +0000 (+0000) Subject: Don't reserve the right amount of space, since we usually come back to that place... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b49b4a8b9b66426b75b9f6c9ed0f003f0cf6c80b;p=dealii-svn.git Don't reserve the right amount of space, since we usually come back to that place later and request even more. The present code then leads to excessive numbers of calls to memory allocation. git-svn-id: https://svn.dealii.org/trunk@13968 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/dof_constraints.cc b/deal.II/deal.II/source/dofs/dof_constraints.cc index c3a2a1e67e..278ec77cf6 100644 --- a/deal.II/deal.II/source/dofs/dof_constraints.cc +++ b/deal.II/deal.II/source/dofs/dof_constraints.cc @@ -256,8 +256,6 @@ void ConstraintMatrix::close () constrained_line->entries[0].second * weight); - line->entries.reserve (line->entries.size() + - constrained_line->entries.size() - 1); for (unsigned int i=1; ientries.size(); ++i) line->entries .push_back (std::make_pair (constrained_line->entries[i].first,