]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Change structure of two Asserts 7518/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 9 Dec 2018 19:10:39 +0000 (20:10 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Sun, 9 Dec 2018 19:10:39 +0000 (20:10 +0100)
source/lac/scalapack.cc

index 273abfc8b0e6d53ee666fc6d3e2925cba57edda0..4e1e038ffc73c45e76b0c1f461bdabdb13509ed6 100644 (file)
@@ -2617,8 +2617,12 @@ ScaLAPACKMatrix<NumberType>::save(
       chunks_size_.first  = n_rows;
       chunks_size_.second = 1;
     }
-  AssertIndexRange(chunks_size_.first - 1, n_rows);
-  AssertIndexRange(chunks_size_.second - 1, n_columns);
+  Assert(chunks_size_.first > 0,
+         ExcMessage("The row chunk size must be larger than 0."));
+  AssertIndexRange(chunks_size_.first, n_rows + 1);
+  Assert(chunks_size_.second > 0,
+         ExcMessage("The column chunk size must be larger than 0."));
+  AssertIndexRange(chunks_size_.second, n_columns + 1);
 
 #    ifdef H5_HAVE_PARALLEL
   // implementation for configurations equipped with a parallel file system

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.