]> https://gitweb.dealii.org/ - dealii.git/commitdiff
output the failing UMFPack function name on error
authorGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 21 Oct 2005 13:54:53 +0000 (13:54 +0000)
committerGuido Kanschat <dr.guido.kanschat@gmail.com>
Fri, 21 Oct 2005 13:54:53 +0000 (13:54 +0000)
git-svn-id: https://svn.dealii.org/trunk@11644 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/include/lac/sparse_direct.h
deal.II/lac/source/sparse_direct.cc

index 1ae3a8ecf661b5606cec92d421d5a501c14f2d5f..a25959c3ae27322446a1969f49b42991faac891f 100644 (file)
@@ -1168,10 +1168,17 @@ class SparseDirectUMFPACK : public Subscriptor
                Vector<double>             &rhs_and_solution);
 
                                      /**
-                                      * Exception
+                                      * One of the UMFPack routines
+                                      * threw an error. The error code
+                                      * is included in the output and
+                                      * can be looked up in the
+                                      * UMFPack user manual. The name
+                                      * of the routine is included for
+                                      * reference.
                                       */
-    DeclException1 (ExcUMFPACKError, int,
-                   << "UMFPACK returned error status " << arg1);
+    DeclException2 (ExcUMFPACKError, char*, int,
+                   << "UMFPACK routine " << arg1
+                   << " returned error status " << arg2);
     
   private:
                                      /**
index c1dcd5684e9a9ad4ff5d5099c7fd4edbeb13167c..9534cee1a3bc81f8df24f2ef418049cd7d724d72 100644 (file)
@@ -1793,13 +1793,13 @@ factorize (const SparseMatrix<double> &matrix)
                                 &Ap[0], &Ai[0], &Ax[0],
                                 &symbolic_decomposition,
                                 &control[0], 0);
-  AssertThrow (status == UMFPACK_OK, ExcUMFPACKError(status));
+  AssertThrow (status == UMFPACK_OK, ExcUMFPACKError("umfpack_di_symbolic", status));
   
   status = umfpack_di_numeric (&Ap[0], &Ai[0], &Ax[0],
                                symbolic_decomposition,
                                &numeric_decomposition,
                                &control[0], 0);
-  AssertThrow (status == UMFPACK_OK, ExcUMFPACKError(status));
+  AssertThrow (status == UMFPACK_OK, ExcUMFPACKError("umfpack_di_numeric", status));
 
   umfpack_di_free_symbolic (&symbolic_decomposition) ;
 }
@@ -1830,7 +1830,7 @@ SparseDirectUMFPACK::solve (Vector<double> &rhs_and_solution) const
                         rhs_and_solution.begin(), rhs.begin(),
                         numeric_decomposition,
                         &control[0], 0);
-  AssertThrow (status == UMFPACK_OK, ExcUMFPACKError(status));
+  AssertThrow (status == UMFPACK_OK, ExcUMFPACKError("umfpack_di_solve", status));
 }
 
 

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.