38 const double&,
double*,
42 const double&,
double*,
51 double&,
double&, octave_idx_type&,
double&,
52 const double*, octave_idx_type&,
53 octave_idx_type&, octave_idx_type&,
54 double*, octave_idx_type&, octave_idx_type*,
67 BEGIN_INTERRUPT_WITH_EXCEPTIONS;
75 tmp_deriv = (*user_fun) (*
tmp_x, time);
77 if (tmp_deriv.
length () == 0)
82 deriv[i] = tmp_deriv.
elem (i);
85 END_INTERRUPT_WITH_EXCEPTIONS;
95 BEGIN_INTERRUPT_WITH_EXCEPTIONS;
103 tmp_jac = (*user_jac) (*
tmp_x, time);
107 pd[nrowpd * j + i] = tmp_jac (i, j);
109 END_INTERRUPT_WITH_EXCEPTIONS;
145 lrw = 22 + n * (9 + n);
178 (*current_liboctave_error_handler)
179 (
"lsode: invalid value for maximum order");
211 if (x.length () != xdot.
length ())
213 (*current_liboctave_error_handler)
214 (
"lsode: inconsistent sizes for state and derivative vectors");
229 if (abs_tol_len == 1)
231 else if (abs_tol_len == n)
235 (*current_liboctave_error_handler)
236 (
"lsode: inconsistent sizes for state and absolute tolerance vectors");
306 (*current_liboctave_error_handler)
307 (
"unrecognized value of istate (= %d) returned from lsode",
320 std::ostringstream buf;
322 std::string t_curr = buf.str ();
327 retval =
"prior to initial integration step";
331 retval =
"successful exit";
335 retval =
"prior to continuation call with modified parameters";
339 retval = std::string (
"excess work on this call (t = ")
340 + t_curr +
"; perhaps wrong integration method)";
344 retval =
"excess accuracy requested (tolerances too small)";
348 retval =
"invalid input detected (see printed message)";
352 retval = std::string (
"repeated error test failures (t = ")
353 + t_curr +
"; check all inputs)";
357 retval = std::string (
"repeated convergence failures (t = ")
359 +
"; perhaps bad Jacobian supplied or wrong choice of integration method or tolerances)";
363 retval = std::string (
"error weight became zero during problem. (t = ")
365 +
"; solution component i vanished, and atol or atol(i) == 0)";
369 retval =
"return requested in user-supplied function (t = "
374 retval =
"unknown error state";
389 if (n_out > 0 && n > 0)
404 retval.
elem (j, i) = x_next.
elem (i);
419 if (n_out > 0 && n > 0)
432 double next_crit = tcrit.
elem (0);
434 while (i_out < n_out)
436 bool do_restart =
false;
438 next_out = tout.
elem (i_out);
440 next_crit = tcrit.
elem (i_crit);
445 if (next_crit == next_out)
454 else if (next_crit < next_out)
488 retval.
elem (i_out-1, i) = x_next.
elem (i);