From: wolf Date: Thu, 22 Nov 2001 16:11:07 +0000 (+0000) Subject: Fix a bug with block vectors. Funny that it worked before. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e3643f278554a0a70b112b25caf434e44f260da;p=dealii-svn.git 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 --- 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 (); };