From ad85af5fbd9fa5caedf4d85842510fda6105aea6 Mon Sep 17 00:00:00 2001 From: kronbichler Date: Mon, 6 Apr 2009 15:45:11 +0000 Subject: [PATCH] Do not use the compress() function when using copy_from with CompressedSP since then the indices are all sorted and unique, and we know how to allocate memory. git-svn-id: https://svn.dealii.org/trunk@18557 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/source/sparsity_pattern.cc | 59 ++++++++++++++++++-------- 1 file changed, 41 insertions(+), 18 deletions(-) diff --git a/deal.II/lac/source/sparsity_pattern.cc b/deal.II/lac/source/sparsity_pattern.cc index af42af2703..32a18e5687 100644 --- a/deal.II/lac/source/sparsity_pattern.cc +++ b/deal.II/lac/source/sparsity_pattern.cc @@ -566,8 +566,15 @@ SparsityPattern::copy_from (const CompressedSparsityPattern &csp, const bool is_square = optimize_diag && (csp.n_rows() == csp.n_cols()); std::vector row_lengths (csp.n_rows()); for (unsigned int i=0; i row_lengths (csp.n_rows()); for (unsigned int i=0; i row_lengths (csp.n_rows()); for (unsigned int i=0; i