]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Bug with block vectors removed
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 22 Nov 2001 15:52:28 +0000 (15:52 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Thu, 22 Nov 2001 15:52:28 +0000 (15:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@5242 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/filtered_matrix.templates.h

index d26f3b59f3fe6cc8caffbd26e497c65102ce31a2..15344f130598be6c7ab1e34ac7a3723c27021707 100644 (file)
@@ -404,8 +404,12 @@ void
 FilteredMatrix<BlockSparseMatrix<double>,BlockVector<double> >::
 allocate_tmp_vector () 
 {
+  std::vector<unsigned int> block_sizes (matrix->n_block_rows());
+  for (unsigned int i=0; i<block_sizes.size(); ++i)
+    block_sizes[i] = matrix->block(i,i).n();
+  
   tmp_mutex.acquire ();
-  tmp_vector.reinit (matrix->n());
+  tmp_vector.reinit (block_sizes);
   tmp_mutex.release ();
 };
 
@@ -416,8 +420,12 @@ void
 FilteredMatrix<BlockSparseMatrix<float>,BlockVector<float> >::
 allocate_tmp_vector () 
 {
+  std::vector<unsigned int> block_sizes (matrix->n_block_rows());
+  for (unsigned int i=0; i<block_sizes.size(); ++i)
+    block_sizes[i] = matrix->block(i,i).n();
+  
   tmp_mutex.acquire ();
-  tmp_vector.reinit (matrix->n());
+  tmp_vector.reinit (block_sizes);
   tmp_mutex.release ();
 };
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.