Mercurial > hg > octave-lyh
diff liboctave/LSODE.cc @ 3996:98107d72871c
[project @ 2002-07-17 16:22:05 by jwe]
author | jwe |
---|---|
date | Wed, 17 Jul 2002 16:22:05 +0000 |
parents | ee0304212be0 |
children | d4091aff6468 |
line wrap: on
line diff
--- a/liboctave/LSODE.cc +++ b/liboctave/LSODE.cc @@ -277,26 +277,29 @@ { switch (istate) { - case -13: // return requested in user-supplied function. - case -6: // error weight became zero during problem. (solution - // component i vanished, and atol or atol(i) = 0.) - case -5: // repeated convergence failures (perhaps bad jacobian - // supplied or wrong choice of mf or tolerances). - 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). - case -1: // excess work done on this call (perhaps wrong mf). - integration_error = true; - break; - - case 2: // lsode was successful + case 1: // prior to initial integration step. + case 2: // lsode was successful. retval = x; t = tout; break; - default: // Error? + case -1: // excess work done on this call (perhaps wrong mf). + case -2: // excess accuracy requested (tolerances too small). + case -3: // illegal input detected (see printed message). + case -4: // repeated error test failures (check all inputs). + case -5: // repeated convergence failures (perhaps bad jacobian + // supplied or wrong choice of mf or tolerances). + case -6: // error weight became zero during problem. (solution + // component i vanished, and atol or atol(i) = 0.) + case -13: // return requested in user-supplied function. + integration_error = true; + break; + + default: + integration_error = true; (*current_liboctave_error_handler) - ("unrecognized value of istate returned from lsode"); + ("unrecognized value of istate (= %d) returned from lsode", + istate); break; } } @@ -311,38 +314,8 @@ 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"; + retval = "prior to initial integration step"; break; case 2: @@ -353,6 +326,36 @@ retval = "prior to continuation call with modified parameters"; break; + case -1: + retval = "excess work on this call (perhaps wrong integration method)"; + break; + + case -2: + retval = "excess accuracy requested (tolerances too small)"; + break; + + case -3: + retval = "invalid input detected (see printed message)"; + break; + + case -4: + retval = "repeated error test failures (check all inputs)"; + break; + + case -5: + retval = "repeated convergence failures (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)"; + break; + + case -13: + retval = "return requested in user-supplied function"; + break; + default: retval = "unknown error state"; break;