naginterfaces.library.ode.ivp_​2nd_​rkn_​interp

naginterfaces.library.ode.ivp_2nd_rkn_interp(t, y, yp, nwant, twant, comm)[source]

ivp_2nd_rkn_interp interpolates components of the solution of a non-stiff system of second-order differential equations from information provided by the integrator ivp_2nd_rkn(), when the low-order method has been used.

For full information please refer to the NAG Library document for d02lz

https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/d02/d02lzf.html

Parameters
tfloat

, the current value at which the solution and its derivative have been computed (as returned in argument on output from ivp_2nd_rkn()).

yfloat, array-like, shape

The th component of the solution at , for , as returned from ivp_2nd_rkn().

ypfloat, array-like, shape

The th component of the derivative at , for , as returned from ivp_2nd_rkn().

nwantint

The number of components of the solution and derivative whose values at are required. The first components are evaluated.

twantfloat

The point at which components of the solution and derivative are to be evaluated. should not normally be an extrapolation point, that is should satisfy

or if integration is proceeding in the negative direction

where told is the previous integration point which is held in an element of the array [‘rwork’] and is, to within rounding, . ( is given by ivp_2nd_rkn_diag().) Extrapolation is permitted but not recommended, and = 2 is returned whenever extrapolation is attempted.

commdict, communication object, modified in place

Communication structure.

This argument must have been initialized by a prior call to ivp_2nd_rkn_setup().

Returns
ywantfloat, ndarray, shape

The calculated value of the th component of the solution at , for .

ypwantfloat, ndarray, shape

The calculated value of the th component of the derivative at , for .

Raises
NagValueError
(errno )

On entry, , but in a previous call to the setup function .

(errno )

The integrator function ivp_2nd_rkn() has not been called.

(errno )

No successful steps, interpolation impossible at .

(errno )

On entry, .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

Interpolation is not permitted on data from the high order formulas.

Warns
NagAlgorithmicWarning
(errno )

Extrapolation at .

Notes

No equivalent traditional C interface for this routine exists in the NAG Library.

ivp_2nd_rkn_interp evaluates the first () components of the solution of a non-stiff system of second-order ordinary differential equations at any point using a special Runge–Kutta–Nystrom formula (see Dormand and Prince (1986)) and information generated by ivp_2nd_rkn() when the low-order method has been used. This information must be presented unchanged to ivp_2nd_rkn_interp. ivp_2nd_rkn_interp should not normally be used to extrapolate outside the range of the values from ivp_2nd_rkn().

References

Dormand, J R and Prince, P J, 1986, Runge–Kutta–Nystrom triples, Mathematical Report TP-CS-86-05, Teesside Polytechnic