]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix two assertions.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 18 May 2000 13:49:37 +0000 (13:49 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Thu, 18 May 2000 13:49:37 +0000 (13:49 +0000)
git-svn-id: https://svn.dealii.org/trunk@2892 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_matrix.h

index e4cd14b2f724ec60c07ba3e52fbe9482df43e00e..aa50d1898b667b4f1008362fa93a900225eb2a85 100644 (file)
@@ -844,7 +844,7 @@ number SparseMatrix<number>::diag_element (const unsigned int i) const
 {
   Assert (cols != 0, ExcMatrixNotInitialized());
   Assert (m() == n(), ExcMatrixNotSquare());
-  Assert (i<max_len, ExcInvalidIndex1(i));
+  Assert (i<m(), ExcInvalidIndex1(i));
   
                                   // Use that the first element in each
                                   // row of a square matrix is the main
@@ -859,7 +859,7 @@ number & SparseMatrix<number>::diag_element (const unsigned int i)
 {
   Assert (cols != 0, ExcMatrixNotInitialized());
   Assert (m() == n(), ExcMatrixNotSquare());
-  Assert (i<max_len, ExcInvalidIndex1(i));
+  Assert (i<m()(), ExcInvalidIndex1(i));
   
                                   // Use that the first element in each
                                   // row of a square matrix is the main

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.