]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix small problem where clear() didn't do what it was supposed to do.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Jun 2004 04:27:53 +0000 (04:27 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 3 Jun 2004 04:27:53 +0000 (04:27 +0000)
git-svn-id: https://svn.dealii.org/trunk@9368 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/c-5.0.html
deal.II/lac/include/lac/block_matrix_base.h

index 671e5c190cae87b05d29df4f1f51adf4ecac7f39..15d2422e37cd31bbfd090f657ef8667dbf7285e9 100644 (file)
@@ -86,6 +86,16 @@ inconvenience this causes.
 <h3>lac</h3>
 
 <ol>
+  <li> <p>
+       Fixed: <code class="member">BlockSparseMatrix::clear()</code> did not
+       do what it was supposed to do: it emptied the individual blocks and
+       removed them, but it still kept the number of blocks
+       unchanged. Subsequent accesses to these blocks, or to their information
+       yielded segmentation faults.
+       <br> 
+       (WB 2004/06/02)
+       </p>
+
   <li> <p>
        New: Block matrices and vectors have been factored into abstract base
        classes and concrete implementation classes. While the previous classes
index 2fe4402d2b80ea2a671a4fea84c3d8af1e76e3a3..99b49b3d643036249b82f0c7df6c78569d674134 100644 (file)
@@ -1076,7 +1076,8 @@ BlockMatrixBase<MatrixType>::clear ()
   for (unsigned int r=0; r<n_block_rows(); ++r)
     for (unsigned int c=0; c<n_block_cols(); ++c)
       block(r,c).clear ();
-  sub_objects.clear ();
+  sub_objects.reinit (0,0);
+  row_block_indices = column_block_indices = BlockIndices();
 
                                    // reset block indices to empty
   row_block_indices = column_block_indices = BlockIndices ();

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.