From: bangerth Date: Mon, 19 Jan 2009 04:30:06 +0000 (+0000) Subject: Re-apply Martin's patch 18223, since we now produce the correct instantiations. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5f79af42b659d5aee0fa847baec460afd5f6517;p=dealii-svn.git Re-apply Martin's patch 18223, since we now produce the correct instantiations. git-svn-id: https://svn.dealii.org/trunk@18248 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/include/numerics/vectors.templates.h b/deal.II/deal.II/include/numerics/vectors.templates.h index c347cb5fa4..6f4616b6d3 100644 --- a/deal.II/deal.II/include/numerics/vectors.templates.h +++ b/deal.II/deal.II/include/numerics/vectors.templates.h @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -460,12 +461,18 @@ void VectorTools::project (const Mapping &mapping, // set up mass matrix and right hand side Vector vec (dof.n_dofs()); - SparsityPattern sparsity(dof.n_dofs(), - dof.n_dofs(), - dof.max_couplings_between_dofs()); - DoFTools::make_sparsity_pattern (dof, sparsity); - constraints.condense (sparsity); - + SparsityPattern sparsity; + + // use csp to consume less memory and to + // still be fast + { + CompressedSimpleSparsityPattern csp (dof.n_dofs(), dof.n_dofs()); + DoFTools::make_sparsity_pattern (dof, csp); + constraints.condense(csp); + + sparsity.copy_from (csp); + } + SparseMatrix mass_matrix (sparsity); Vector tmp (mass_matrix.n());