From 0e3643f278554a0a70b112b25caf434e44f260da Mon Sep 17 00:00:00 2001 From: wolf Date: Thu, 22 Nov 2001 16:11:07 +0000 Subject: [PATCH] Fix a bug with block vectors. Funny that it worked before. git-svn-id: https://svn.dealii.org/branches/Branch-3-2@5244 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/lac/include/lac/filtered_matrix.templates.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/deal.II/lac/include/lac/filtered_matrix.templates.h b/deal.II/lac/include/lac/filtered_matrix.templates.h index f24a79bda1..be1e8701ed 100644 --- a/deal.II/lac/include/lac/filtered_matrix.templates.h +++ b/deal.II/lac/include/lac/filtered_matrix.templates.h @@ -403,8 +403,12 @@ void FilteredMatrix,BlockVector >:: allocate_tmp_vector () { + std::vector block_sizes (matrix->n_block_rows()); + for (unsigned int i=0; iblock(i,i).n(); + tmp_mutex.acquire (); - tmp_vector.reinit (matrix->n()); + tmp_vector.reinit (block_sizes); tmp_mutex.release (); }; @@ -415,8 +419,12 @@ void FilteredMatrix,BlockVector >:: allocate_tmp_vector () { + std::vector block_sizes (matrix->n_block_rows()); + for (unsigned int i=0; iblock(i,i).n(); + tmp_mutex.acquire (); - tmp_vector.reinit (matrix->n()); + tmp_vector.reinit (block_sizes); tmp_mutex.release (); }; -- 2.39.5