]> https://gitweb.dealii.org/ - dealii.git/commitdiff
fix bug with missing min(...,n)
authorRalf Hartmann <Ralf.Hartmann@dlr.de>
Thu, 11 May 2000 08:39:24 +0000 (08:39 +0000)
committerRalf Hartmann <Ralf.Hartmann@dlr.de>
Thu, 11 May 2000 08:39:24 +0000 (08:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@2837 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/sparsity_pattern.cc

index 49ac236548636ded6badafc4e04fffc01be84731..8876b4dfa94a3fa988aebe009fbed215f5b35313 100644 (file)
@@ -296,7 +296,7 @@ SparsityPattern::reinit (const unsigned int m,
                                   // set the rowstart array 
   rowstart[0] = 0;
   for (unsigned int i=1; i<=rows; ++i)
-    rowstart[i] = rowstart[i-1]+row_lengths[i-1];
+    rowstart[i] = rowstart[i-1]+min(row_lengths[i-1],n);
   Assert (rowstart[rows]==vec_len, ExcInternalError());
 
                                   // preset the column numbers by a

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.