From: Martin Kronbichler Date: Mon, 4 May 2009 07:16:15 +0000 (+0000) Subject: Even in 2D, it is faster to first create a CSP and then reinit the SP. X-Git-Tag: v8.0.0~7716 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9f408ee59dedc6860dde4dd2130dfbfffefeeef0;p=dealii.git Even in 2D, it is faster to first create a CSP and then reinit the SP. git-svn-id: https://svn.dealii.org/trunk@18807 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/dofs/dof_renumbering.cc b/deal.II/deal.II/source/dofs/dof_renumbering.cc index 5435c21577..67d3c39526 100644 --- a/deal.II/deal.II/source/dofs/dof_renumbering.cc +++ b/deal.II/deal.II/source/dofs/dof_renumbering.cc @@ -444,13 +444,13 @@ namespace DoFRenumbering constraints.close (); SparsityPattern sparsity; - if (DH::dimension <= 2) + if (DH::dimension < 2) { sparsity.reinit (dof_handler.n_dofs(), dof_handler.n_dofs(), dof_handler.max_couplings_between_dofs()); - DoFTools::make_sparsity_pattern (dof_handler, sparsity); - constraints.condense (sparsity); + DoFTools::make_sparsity_pattern (dof_handler, sparsity, constraints); + sparsity.compress(); } else {