From 1ab9b2eb992f55e9b6029a3cf14d01dc5d426fa0 Mon Sep 17 00:00:00 2001 From: bangerth Date: Mon, 31 Dec 2012 00:58:50 +0000 Subject: [PATCH] Do not worry too much about the 1d case -- everything is cheap there. git-svn-id: https://svn.dealii.org/branches/branch_deprecated@27878 0785d39b-7218-0410-832d-ea1e28bc413d --- .../deal.II/numerics/vector_tools.templates.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/deal.II/include/deal.II/numerics/vector_tools.templates.h b/deal.II/include/deal.II/numerics/vector_tools.templates.h index fad52b0d39..5493caa95f 100644 --- a/deal.II/include/deal.II/numerics/vector_tools.templates.h +++ b/deal.II/include/deal.II/numerics/vector_tools.templates.h @@ -2140,17 +2140,20 @@ namespace VectorTools DoFTools::map_dof_to_boundary_indices (dof, selected_boundary_components, dof_to_boundary_mapping); - // Done if no degrees of freedom on - // the boundary + // Done if no degrees of freedom on the boundary if (dof.n_boundary_dofs (boundary_functions) == 0) return; + // set up sparsity structure - SparsityPattern sparsity(dof.n_boundary_dofs (boundary_functions), - dof.max_couplings_between_boundary_dofs()); + CompressedSparsityPattern c_sparsity(dof.n_dofs()); DoFTools::make_boundary_sparsity_pattern (dof, boundary_functions, dof_to_boundary_mapping, - sparsity); + c_sparsity); + SparsityPattern sparsity; + sparsity.copy_from(c_sparsity); + + // note: for three or more dimensions, there // may be constrained nodes on the boundary -- 2.39.5