diff liboctave/DASPK.cc @ 4043:6fae69a1796e

[project @ 2002-08-15 03:36:27 by jwe]
author jwe
date Thu, 15 Aug 2002 03:36:27 +0000
parents f6df65db67f9
children 7b0c139ac8af
line wrap: on
line diff
--- a/liboctave/DASPK.cc	Thu Aug 15 02:30:41 2002 +0000
+++ b/liboctave/DASPK.cc	Thu Aug 15 03:36:27 2002 +0000
@@ -31,6 +31,8 @@
 #include <cfloat>
 #include <cmath>
 
+#include <strstream>
+
 #include "DASPK.h"
 #include "f77-fcn.h"
 #include "lo-error.h"
@@ -517,6 +519,12 @@
 {
   std::string retval;
 
+  std::ostrstream buf;
+  buf << t << ends;
+  const char *t = buf.str ();
+  std::string t_curr = t;
+  delete [] t;
+
   switch (istate)
     {
     case 1:
@@ -536,7 +544,8 @@
       break;
 
     case -1:
-      retval = "a large amount of work has been expended";
+      retval = std::string ("a large amount of work has been expended (t =")
+	+ t_curr + ")";
       break;
 
     case -2:
@@ -544,32 +553,39 @@
       break;
 
     case -3:
-      retval = "error weight became zero during problem.\
-  (solution component i vanished, and atol or atol(i) == 0)";
+      retval = std::string ("error weight became zero during problem. (t = ")
+	+ t_curr
+	+ "; solution component i vanished, and atol or atol(i) == 0)";
       break;
 
     case -6:
-      retval = "repeated error test failures on the last attempted step";
+      retval = std::string ("repeated error test failures on the last attempted step (t = ")
+	+ t_curr + ")";
       break;
 
     case -7:
-      retval = "the corrector could not converge";
+      retval = std::string ("the corrector could not converge (t = ")
+	+ t_curr + ")";
       break;
 
     case -8:
-      retval = "the matrix of partial derivatives is singular";
+      retval = std::string ("the matrix of partial derivatives is singular (t = ")
+	+ t_curr + ")";
       break;
 
     case -9:
-      retval = "the corrector could not converge (repeated test failures)";
+      retval = std::string ("the corrector could not converge (t = ")
+	+ t_curr + "; repeated test failures)";
       break;
 
     case -10:
-      retval = "corrector could not converge because IRES was -1";
+      retval = std::string ("corrector could not converge because IRES was -1 (t = ")
+	+ t_curr + ")";
       break;
 
     case -11:
-      retval = "return requested in user-supplied function";
+      retval = std::string ("return requested in user-supplied function (t = ")
+	+ t_curr + ")";
       break;
 
     case -12:
@@ -577,11 +593,13 @@
       break;
 
     case -13:
-      retval = "unrecoverable error encountered inside user's PSOL function";
+      retval = std::string ("unrecoverable error encountered inside user's PSOL function (t = ")
+	+ t_curr + ")";
       break;
 
     case -14:
-      retval = "the Krylov linear system solver failed to converge";
+      retval = std::string ("the Krylov linear system solver failed to converge (t = ")
+	+ t_curr + ")";
       break;
 
     case -33: