Skip to content

__daspk__

builtin · libnexusinterp/corefcn/daspk-proprietary.cc

: [x, xdot, istate, msg] = __daspk__ (fcn, x0, xdot0, t)
: [x, xdot, istate, msg] = __daspk__ (fcn, x0, xdot0, t, t_crit)

Solve the implicit differential-algebraic system f (x, xdot, t) = 0 with the DASPK package, starting from x(t0) = x0 and xdot(t0) = xdot0. The calling convention is the same as that of dassl.

fcn is a function handle, a function name, or a cell array {f, jac}. f (x, xdot, t) returns the residual vector; the optional jac (x, xdot, t, cj) returns the iteration matrix {}f/{}x + cj * {}f/{}xdot.

t lists the output times (monotonic, first element is the start time). Row k of x and xdot belongs to t(k). t_crit optionally lists times the integrator must not step past.

istate is 3 after a normal run, and msg describes the outcome. A negative istate reports a failure, which is raised as an error unless istate is requested as an output.

Solver settings are read and changed with daspk_options.