Mercurial > hg > octave-lyh
diff liboctave/LSODE.cc @ 3959:5a848097fe4a
[project @ 2002-05-24 17:58:16 by jwe]
author | jwe |
---|---|
date | Fri, 24 May 2002 17:58:17 +0000 |
parents | dc970f5941ee |
children | ee0304212be0 |
line wrap: on
line diff
--- a/liboctave/LSODE.cc +++ b/liboctave/LSODE.cc @@ -316,13 +316,7 @@ case -4: // repeated error test failures (check all inputs). case -3: // illegal input detected (see printed message). case -2: // excess accuracy requested (tolerances too small). - integration_error = 1; - break; - case -1: // excess work done on this call (perhaps wrong mf). - (*current_liboctave_error_handler) - ("giving up after more than %d steps attempted in lsode", - step_limit ()); integration_error = 1; break; @@ -341,6 +335,63 @@ return retval; } +std::string +LSODE::error_message (void) const +{ + std::string retval; + + switch (istate) + { + case -13: + retval = "return requested in user-supplied function"; + break; + + case -6: + retval = "Error weight became zero during problem.\ + (solution component i vanished, and atol or atol(i) == 0)"; + break; + + case -5: + retval = "repeated convergence failures (perhaps bad jacobian\ + supplied or wrong choice of integration method or tolerances)"; + break; + + case -4: + retval = "repeated error test failures (check all inputs)"; + break; + + case -3: + retval = "invalid input detected (see printed message)"; + break; + + case -2: + retval = "excess accuracy requested (tolerances too small)"; + break; + + case -1: + retval = "excess work on this call (perhaps wrong integration method)"; + break; + + case 1: + retval = "prior to initial call"; + break; + + case 2: + retval = "successful exit"; + break; + + case 3: + retval = "prior to continuation call with modified parameters"; + break; + + default: + retval = "unknown error state"; + break; + } + + return retval; +} + Matrix LSODE::do_integrate (const ColumnVector& tout) {