comparison liboctave/LSODE.cc @ 3189:bef7b73c0724

[project @ 1998-10-16 18:05:26 by jwe]
author jwe
date Fri, 16 Oct 1998 18:05:31 +0000
parents 09a3064a3a17
children dd00769643ae
comparison
equal deleted inserted replaced
3188:df7c57a6639d 3189:bef7b73c0724
242 if (step_limit () > 0) 242 if (step_limit () > 0)
243 iwork.elem (5) = step_limit (); 243 iwork.elem (5) = step_limit ();
244 244
245 int *piwork = iwork.fortran_vec (); 245 int *piwork = iwork.fortran_vec ();
246 double *prwork = rwork.fortran_vec (); 246 double *prwork = rwork.fortran_vec ();
247
248 again:
249 247
250 F77_XFCN (lsode, LSODE, (lsode_f, n, xp, t, tout, itol, rel_tol, 248 F77_XFCN (lsode, LSODE, (lsode_f, n, xp, t, tout, itol, rel_tol,
251 abs_tol, itask, istate, iopt, prwork, lrw, 249 abs_tol, itask, istate, iopt, prwork, lrw,
252 piwork, liw, lsode_j, method_flag)); 250 piwork, liw, lsode_j, method_flag));
253 251
270 case -2: // excess accuracy requested (tolerances too small). 268 case -2: // excess accuracy requested (tolerances too small).
271 integration_error = 1; 269 integration_error = 1;
272 break; 270 break;
273 271
274 case -1: // excess work done on this call (perhaps wrong mf). 272 case -1: // excess work done on this call (perhaps wrong mf).
275 if (step_limit () > 0) 273 (*current_liboctave_error_handler)
276 { 274 ("giving up after more than %d steps attempted in lsode",
277 (*current_liboctave_error_handler) 275 step_limit ());
278 ("giving up after more than %d steps attempted in lsode", 276 integration_error = 1;
279 step_limit ());
280 integration_error = 1;
281 }
282 else
283 {
284 istate = 2;
285 goto again;
286 }
287 break; 277 break;
288 278
289 case 2: // lsode was successful 279 case 2: // lsode was successful
290 retval = x; 280 retval = x;
291 t = tout; 281 t = tout;