]> https://gitweb.dealii.org/ - dealii.git/commitdiff
add missing Asserts in is_symmetric() and is_hermitian() 2314/head
authorDenis Davydov <davydden@gmail.com>
Mon, 7 Mar 2016 10:33:45 +0000 (11:33 +0100)
committerDenis Davydov <davydden@gmail.com>
Mon, 7 Mar 2016 10:33:45 +0000 (11:33 +0100)
source/lac/petsc_matrix_base.cc

index 7f5b0d78d37c51ab8df3d3c3ecc8c71d51355693..cea675dfb9dc2ada9faf7fdbed6e32c825ff2581 100644 (file)
@@ -578,7 +578,9 @@ namespace PETScWrappers
 #endif
     truth;
     assert_is_compressed ();
-    MatIsSymmetric (matrix, tolerance, &truth);
+    int ierr = MatIsSymmetric (matrix, tolerance, &truth);
+    (void)ierr;
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
     return truth;
   }
 
@@ -597,7 +599,9 @@ namespace PETScWrappers
     truth;
 
     assert_is_compressed ();
-    MatIsHermitian (matrix, tolerance, &truth);
+    int ierr = MatIsHermitian (matrix, tolerance, &truth);
+    (void)ierr;
+    AssertThrow (ierr == 0, ExcPETScError(ierr));
 
     return truth;
   }

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.