Mercurial > hg > octave-lyh
diff liboctave/LSODE.cc @ 4042:8bc97120fbd5
[project @ 2002-08-15 02:30:40 by jwe]
author | jwe |
---|---|
date | Thu, 15 Aug 2002 02:30:41 +0000 |
parents | f6df65db67f9 |
children | 6fae69a1796e |
line wrap: on
line diff
--- a/liboctave/LSODE.cc +++ b/liboctave/LSODE.cc @@ -32,6 +32,7 @@ #include <cmath> #include <iostream> +#include <strstream> #include "LSODE.h" #include "f77-fcn.h" @@ -298,6 +299,12 @@ { std::string retval; + std::ostrstream buf; + buf << t << ends; + const char *t = buf.str (); + std::string curr_t = t; + delete [] t; + switch (istate) { case 1: @@ -313,7 +320,8 @@ break; case -1: - retval = "excess work on this call (perhaps wrong integration method)"; + retval = std::string ("excess work on this call (t = ") + + curr_t + "; perhaps wrong integration method)"; break; case -2: @@ -325,21 +333,25 @@ break; case -4: - retval = "repeated error test failures (check all inputs)"; + retval = std::string ("repeated error test failures (t = ") + + curr_t + "check all inputs)"; break; case -5: - retval = "repeated convergence failures (perhaps bad jacobian\ - supplied or wrong choice of integration method or tolerances)"; + retval = std::string ("repeated convergence failures (t = ") + + curr_t + + "perhaps bad jacobian supplied or wrong choice of integration method or tolerances)"; break; case -6: - 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 = ") + + curr_t + + "; solution component i vanished, and atol or atol(i) == 0)"; break; case -13: - retval = "return requested in user-supplied function"; + retval = "return requested in user-supplied function (t = " + + curr_t + ")"; break; default: