]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Make failure mode more explicit.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Oct 2010 21:18:07 +0000 (21:18 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 15 Oct 2010 21:18:07 +0000 (21:18 +0000)
git-svn-id: https://svn.dealii.org/trunk@22351 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/lac/source/trilinos_solver.cc

index aadc4b0bd715625569b86fa3830fc0b23f5f54cf..18517f414e71719a881832e51baa2ea45707bbd7 100644 (file)
@@ -2,7 +2,7 @@
 //    $Id$
 //    Version: $Name$
 //
-//    Copyright (C) 2008 by the deal.II authors
+//    Copyright (C) 2008, 2010 by the deal.II authors
 //
 //    This file is subject to QPL and may not be  distributed
 //    without copyright and license information. Please refer
@@ -129,7 +129,31 @@ namespace TrilinosWrappers
                                        // ... and then solve!
     ierr = solver.Iterate (solver_control.max_steps(),
                           solver_control.tolerance());
-    AssertThrow (ierr >= 0, ExcTrilinosError(ierr));
+
+                                    // report errors in more detail
+                                    // than just by checking whether
+                                    // the return status is zero or
+                                    // greater. the error strings are
+                                    // taken from the implementation
+                                    // of the AztecOO::Iterate
+                                    // function
+    switch (ierr)
+      {
+       case -1:
+             AssertThrow (false, ExcMessage("AztecOO::Iterate error code -1: "
+                                            "option not implemented"));
+       case -2:
+             AssertThrow (false, ExcMessage("AztecOO::Iterate error code -2: "
+                                            "numerical breakdown"));
+       case -3:
+             AssertThrow (false, ExcMessage("AztecOO::Iterate error code -3: "
+                                            "loss of precision"));
+       case -4:
+             AssertThrow (false, ExcMessage("AztecOO::Iterate error code -4: "
+                                            "GMRES hessenberg ill-conditioned"));
+       default:
+             AssertThrow (ierr >= 0, ExcTrilinosError(ierr));
+      }
 
                                        // Finally, let the deal.II
                                        // SolverControl object know

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.