naginterfaces.library.ode.ivp_​adams_​interp

naginterfaces.library.ode.ivp_adams_interp(neqf, twant, nwant, comm)[source]

ivp_adams_interp interpolates components of the solution of a non-stiff system of first-order differential equations from information provided by the integrator functions ivp_adams_roots() or ivp_adams_roots_revcom().

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

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/d02/d02qzf.html

Parameters
neqfint

The number of first-order ordinary differential equations being solved by the integration function. It must contain the same value as the argument in a prior call to the setup function ivp_adams_setup().

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 is the previous integration point and is, to within rounding, (see ivp_adams_diag()). Extrapolation is permitted but not recommended and = 2 is returned whenever extrapolation is attempted.

nwantint

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

commdict, communication object, modified in place

Communication structure.

This argument must have been initialized by prior calls to ivp_adams_setup() and one of ivp_adams_roots() or ivp_adams_roots_revcom().

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, .

Constraint: .

(errno )

On entry, and .

Constraint: .

(errno )

On entry, and in ivp_adams_setup().

Constraint: in ivp_adams_setup().

(errno )

Neither of the appropriate two integrator functions has been called.

Warns
NagAlgorithmicWarning
(errno )

No successful steps had been taken, so interpolation is impossible at .

(errno )

Extrapolation performed at .

Notes

In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.

ivp_adams_interp evaluates the first components of the solution of a non-stiff system of first-order ordinary differential equations at any point using the method of Watts and Shampine (1986) and information generated by ivp_adams_roots() or ivp_adams_roots_revcom(). ivp_adams_interp should not normally be used to extrapolate outside the current range of the values produced by the integration function.

References

Watts, H A and Shampine, L F, 1986, Smoother interpolants for Adams codes, SIAM J. Sci. Statist. Comput. (7), 334–345