Mercurial > hg > octave-lyh
changeset 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 |
files | liboctave/DASPK.cc liboctave/DASRT.cc liboctave/DASSL.cc liboctave/LSODE.cc liboctave/ODESSA.cc |
diffstat | 5 files changed, 310 insertions(+), 100 deletions(-) [+] |
line wrap: on
line diff
--- a/liboctave/DASPK.cc +++ b/liboctave/DASPK.cc @@ -289,7 +289,10 @@ case 3: // The integration to TOUT was successfully completed // (T=TOUT) by stepping past TOUT. Y(*) is obtained by // interpolation. YPRIME(*) is obtained by interpolation. - + case 4: // The initial condition calculation, with + // INFO(11) > 0, was successful, and INFO(14) = 1. + // No integration steps were taken, and the solution + // is not considered to have been started. retval = x; t = tout; break; @@ -312,12 +315,22 @@ case -11: // IRES equal to -2 was encountered and control is being // returned to the calling program. case -12: // DDASPK failed to compute the initial YPRIME. + case -13: // Unrecoverable error encountered inside user's + // PSOL routine, and control is being returned to + // the calling program. + case -14: // The Krylov linear system solver could not + // achieve convergence. case -33: // The code has encountered trouble from which it cannot // recover. A message is printed explaining the trouble // and control is returned to the calling program. For // example, this occurs when invalid input is detected. + integration_error = true; + break; + default: integration_error = true; + (*current_liboctave_error_handler) + ("unrecognized value of idid (= %d) returned from ddaspk", idid); break; } } @@ -483,6 +496,75 @@ switch (idid) { + case 1: + retval = "a step was successfully taken in intermediate-output mode."; + break; + + case 2: + retval = "integration completed by stepping exactly to TOUT"; + break; + + case 3: + retval = "integration to tout completed by stepping past TOUT"; + break; + + case 4: + retval = "initial condition calculation completed successfully"; + break; + + case -1: + retval = "a large amount of work has been expended"; + break; + + case -2: + retval = "the error tolerances are too stringent"; + break; + + case -3: + retval = "error weight became zero during problem.\ + (solution component i vanished, and atol or atol(i) == 0)"; + break; + + case -6: + retval = "repeated error test failures on the last attempted step"; + break; + + case -7: + retval = "the corrector could not converge"; + break; + + case -8: + retval = "the matrix of partial derivatives is singular"; + break; + + case -9: + retval = "the corrector could not converge (repeated test failures)"; + break; + + case -10: + retval = "corrector could not converge because IRES was -1"; + break; + + case -11: + retval = "return requested in user-supplied function"; + break; + + case -12: + retval = "failed to compute consistent initial conditions"; + break; + + case -13: + retval = "unrecoverable error encountered inside user's PSOL function"; + break; + + case -14: + retval = "the Krylov linear system solver failed to converge"; + break; + + case -33: + retval = "unrecoverable error (see printed message)"; + break; + default: retval = "unknown error state"; break;
--- a/liboctave/DASRT.cc +++ b/liboctave/DASRT.cc @@ -329,7 +329,6 @@ { switch (idid) { - case 0: // Initial conditions made consistent. case 1: // A step was successfully taken in intermediate-output // mode. The code has not yet reached TOUT. case 2: // The integration to TOUT was successfully completed @@ -337,16 +336,14 @@ case 3: // The integration to TOUT was successfully completed // (T=TOUT) by stepping past TOUT. Y(*) is obtained by // interpolation. YPRIME(*) is obtained by interpolation. - case 5: // The integration to TSTOP was successfully completed - // (T=TSTOP) by stepping to TSTOP within the - // tolerance. Must restart to continue. t = tout; break; - case 4: // We've hit the stopping condition. + case 4: // The integration was successfully completed + // by finding one or more roots of G at T. break; - case -1: // A large amount of work has been expended. (~500 steps). + case -1: // A large amount of work has been expended. case -2: // The error tolerances are too stringent. case -3: // The local error test cannot be satisfied because you // specified a zero component in ATOL and the @@ -368,10 +365,13 @@ // recover. A message is printed explaining the trouble // and control is returned to the calling program. For // example, this occurs when invalid input is detected. + integration_error = true; + break; + default: integration_error = true; (*current_liboctave_error_handler) - ("ddasrt failed with IDID = %d", idid); + ("unrecognized value of idid (= %d) returned from ddasrt", idid); break; } } @@ -560,6 +560,67 @@ switch (idid) { + case 1: + retval = "a step was successfully taken in intermediate-output mode."; + break; + + case 2: + retval = "integration completed by stepping exactly to TOUT"; + break; + + case 3: + retval = "integration to tout completed by stepping past TOUT"; + break; + + case 4: + retval = "integration completed by finding one or more roots of G at T"; + break; + + case -1: + retval = "a large amount of work has been expended"; + break; + + case -2: + retval = "the error tolerances are too stringent"; + break; + + case -3: + retval = "error weight became zero during problem.\ + (solution component i vanished, and atol or atol(i) == 0)"; + break; + + case -6: + retval = "repeated error test failures on the last attempted step"; + break; + + case -7: + retval = "the corrector could not converge"; + break; + + case -8: + retval = "the matrix of partial derivatives is singular"; + break; + + case -9: + retval = "the corrector could not converge (repeated test failures)"; + break; + + case -10: + retval = "corrector could not converge because IRES was -1"; + break; + + case -11: + retval = "return requested in user-supplied function"; + break; + + case -12: + retval = "failed to compute consistent initial conditions"; + break; + + case -33: + retval = "unrecoverable error (see printed message)"; + break; + default: retval = "unknown error state"; break;
--- a/liboctave/DASSL.cc +++ b/liboctave/DASSL.cc @@ -288,8 +288,13 @@ // recover. A message is printed explaining the trouble // and control is returned to the calling program. For // example, this occurs when invalid input is detected. + integration_error = true; + break; + default: integration_error = true; + (*current_liboctave_error_handler) + ("unrecognized value of idid (= %d) returned from ddassl", idid); break; } } @@ -455,6 +460,63 @@ switch (idid) { + case 1: + retval = "a step was successfully taken in intermediate-output mode."; + break; + + case 2: + retval = "integration completed by stepping exactly to TOUT"; + break; + + case 3: + retval = "integration to tout completed by stepping past TOUT"; + break; + + case -1: + retval = "a large amount of work has been expended"; + break; + + case -2: + retval = "the error tolerances are too stringent"; + break; + + case -3: + retval = "error weight became zero during problem.\ + (solution component i vanished, and atol or atol(i) == 0)"; + break; + + case -6: + retval = "repeated error test failures on the last attempted step"; + break; + + case -7: + retval = "the corrector could not converge"; + break; + + case -8: + retval = "the matrix of partial derivatives is singular"; + break; + + case -9: + retval = "the corrector could not converge (repeated test failures)"; + break; + + case -10: + retval = "corrector could not converge because IRES was -1"; + break; + + case -11: + retval = "return requested in user-supplied function"; + break; + + case -12: + retval = "failed to compute consistent initial conditions"; + break; + + case -33: + retval = "unrecoverable error (see printed message)"; + break; + default: retval = "unknown error state"; break;
--- 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;
--- a/liboctave/ODESSA.cc +++ b/liboctave/ODESSA.cc @@ -390,7 +390,7 @@ else { (*current_liboctave_error_handler) - ("lsode: inconsistent sizes for state and absolute tolerance vectors"); + ("odessa: inconsistent sizes for state and absolute tolerance vectors"); integration_error = 1; return; @@ -443,26 +443,28 @@ { 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 1: // prior to initial integration step. + case 2: // odessa was successful. + t = tout; + break; + + 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 -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). + 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 = 1; break; - case 1: // tout is same as t - case 2: // lsode was successful - t = tout; - break; - - default: // Error? + default: + integration_error = 1; (*current_liboctave_error_handler) - ("unrecognized value of istate returned from lsode"); + ("unrecognized value of istate (= %d) returned from odessa", + istate); break; } } @@ -475,38 +477,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: @@ -517,6 +489,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;