]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Fix one more problem.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Jan 2010 10:05:29 +0000 (10:05 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 6 Jan 2010 10:05:29 +0000 (10:05 +0000)
git-svn-id: https://svn.dealii.org/trunk@20305 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/doc/news/changes.h
deal.II/lac/source/block_sparsity_pattern.cc

index 365cbd11dbf026f132b0d89ce12cbedf231b8b74..446b0ef498754ece9b4d658c6f2bb2757ae75ec3 100644 (file)
@@ -376,6 +376,16 @@ inconvenience this causes.
 <h3>lac</h3>
 
 <ol>
+  <li>
+    <p>
+    Fixed: BlockSparsityPattern::copy_from accidentally only copied
+    n_block_rows times n_block_rows blocks, instead of n_block_rows
+    times n_block_cols. This is now fixed.
+    </p>
+  <br>
+  (WB 2010/01/06)
+  </li>
+
   <li>
     <p>
     Fixed: SparsityPattern::copy_from crashed whenever a compressed sparsity
index 72a4b26575365b690f89dde879e236cc268fa56c..213c4bb587f6930d3d2fbb824a9b7a3eef7eb520 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009 by the deal.II authors
+//    Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2009, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -390,8 +390,8 @@ BlockSparsityPattern::copy_from  (const BlockCompressedSparsityPattern &csp)
   reinit (csp.n_block_rows(), csp.n_block_cols());
 
                                   // copy over blocks
-  for (unsigned int i=0; i<rows; ++i)
-    for (unsigned int j=0; j<rows; ++j)
+  for (unsigned int i=0; i<n_block_rows(); ++i)
+    for (unsigned int j=0; j<n_block_cols(); ++j)
       block(i,j).copy_from (csp.block(i,j));
 
                                   // and finally enquire their new

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.