]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
allow empty matrices
authorguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 23 Aug 2002 15:30:01 +0000 (15:30 +0000)
committerguido <guido@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 23 Aug 2002 15:30:01 +0000 (15:30 +0000)
git-svn-id: https://svn.dealii.org/trunk@6340 0785d39b-7218-0410-832d-ea1e28bc413d

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

index d227e6c843cc52ff09bc1b2f0b7dd73b54ded027..eb72506f775911e6b306c94c7b4f3dc6bdf85f66 100644 (file)
@@ -117,7 +117,7 @@ SparseMatrix<number>::reinit ()
     };
 
   const unsigned int N = cols->n_nonzero_elements();
-  if (N > max_len)
+  if (N > max_len || max_len == 0)
     {
       if (val) delete[] val;
       val = new number[N];

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.