Mercurial > hg > octave-lyh
diff liboctave/DASSL.cc @ 4047:7b0c139ac8af
[project @ 2002-08-15 20:52:55 by jwe]
author | jwe |
---|---|
date | Thu, 15 Aug 2002 20:52:55 +0000 |
parents | 6fae69a1796e |
children | a35a3c5d4740 |
line wrap: on
line diff
--- a/liboctave/DASSL.cc +++ b/liboctave/DASSL.cc @@ -161,6 +161,9 @@ ColumnVector DASSL::do_integrate (double tout) { + // XXX FIXME XXX -- should handle all this option stuff just once + // for each new problem. + ColumnVector retval; if (restart) @@ -239,21 +242,46 @@ return retval; } - if (initial_step_size () >= 0.0) + double hmax = maximum_step_size (); + if (hmax >= 0.0) { - rwork.elem (2) = initial_step_size (); + rwork.elem (1) = hmax; + info.elem (6) = 1; + } + else + info.elem (6) = 0; + + double h0 = initial_step_size (); + if (h0 >= 0.0) + { + rwork.elem (2) = h0; info.elem (7) = 1; } else info.elem (7) = 0; - if (maximum_step_size () >= 0.0) + int maxord = maximum_order (); + if (maxord >= 0) { - rwork.elem (1) = maximum_step_size (); - info.elem (6) = 1; + if (maxord > 0 && maxord < 6) + { + info(8) = 1; + iwork(2) = maxord; + } + else + { + (*current_liboctave_error_handler) + ("dassl: invalid value for maximum order"); + integration_error = true; + return retval; + } } - else - info.elem (6) = 0; + + int enc = enforce_nonnegativity_constraints (); + info (9) = enc ? 1 : 0; + + int ccic = compute_consistent_initial_condition (); + info(10) = ccic ? 1 : 0; double *dummy = 0; int *idummy = 0;