XLPack 6.1
Python API Reference Manual
Loading...
Searching...
No Matches

◆ derkf_int()

def derkf_int ( ,
,
,
wsave   
)

Initial value problem of a system of first order ordinary differential equations (5(4)-th order Runge-Kutta-Fehlberg method) (Interpolation for dense output)

Purpose
This is the support routine which interpolates the solution for dense output when an initial value problem of a system of ordinary differential equations is solved by derkf. For the details of interpolants used here, refer to the reference below.

derkf must be called with setting parameter mode = 2 to enable dense output. Additional function evaluation for dense output is not required.
When returned from derkf with info1 = 2 (info1 = 1 for last step) after accepted step, the interpolated solution within latest step interval can be computed by using this routine.
Returns
info (int)
= 0: Successful exit.
= -1: The argument n had an illegal value. (n < 1)
= -3: The argument y is invalid.
= -4: The argument wsave is invalid.
Parameters
[in]nNumber of differential equations. (n >= 1)
[in]tt at which the interpolated solution is computed.
t must be in the interval of the last step. That is, t1 <= t <= t2 where t1 is the value of t on the previous return from derkf with info1 = 2, and t2 is the value on the last return with info1 = 2.
[out]yNumpy ndarray (1-dimensional, float, n)
Interpolated solution at t.
[out]wsaveNumpy ndarray (1-dimensional, float, length 11*n + 20)
Data save area used by derkf.
Reference
W H Enright et al. "Interpolants for Runge-Kutta Formulas" ACM Transactions on Mathematical Software Vol.12, No.3, 1986, pp.193-218
Example Program
See example program (2) of derkf.