naginterfaces.library.ode.ivp_​rk_​interp_​eval

naginterfaces.library.ode.ivp_rk_interp_eval(icheck, n, nwant, t, ideriv, comm)[source]

ivp_rk_interp_eval evaluates the interpolant calculated by ivp_rk_interp_setup(), following an integration step performed by ivp_rk_step_revcomm() to solve an initial value problem.

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

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

Parameters
icheckint

Indicates whether consistency checks on input arguments should be performed

Don’t perform checks on input arguments.

Perform consistency checks on input arguments.

It is recommended to use on the first call following a call to ivp_rk_interp_setup() and to set on subsequent calls within the last step to avoid the overhead of argument checking.

nint

, the dimension of the system of ODEs being integrated.

nwantint

Only the first system components to be computed. This should be the same value as passed to ivp_rk_interp_setup() when computing the interpolant.

tfloat

, the value of the independent variable where a solution is desired. Although any value of can be supplied, accurate solutions can only be obtained for values in the range of the last time-step taken by ivp_rk_step_revcomm().

iderivint

Compute approximations to the first components of the solution .

Compute approximations to the first components of the first derivatives of the solution .

commdict, communication object, modified in place

Communication structure.

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

Returns
solfloat, ndarray, shape

The first components of the solution .

The first components of the first derivatives of the solution .

Raises
NagValueError
(errno )

The previous call to the interpolation setup function returned an error.

(errno )

You cannot call this function before you have called the interpolation setup.

(errno )

On entry, , but the value passed to the setup routine was .

(errno )

On entry, .

Constraint: or .

(errno )

On entry, , but on interpolation setup .

Constraint: must be unchanged from setup.

(errno )

On entry, and .

Constraint: for or , .

(errno )

On entry, , and .

Constraint: for or , .

(errno )

On entry, .

Constraint: for or , .

(errno )

On entry, a previous call to the setup function has not been made or the communication arrays have become corrupted, or a catastrophic error has already been detected elsewhere.

You cannot continue integrating the problem.

Notes

When integrating using the reverse communication Runge–Kutta integrator ivp_rk_step_revcomm(), the solution or its derivatives can be obtained inexpensively between steps by interpolation. ivp_rk_interp_setup() is called after a step by ivp_rk_step_revcomm() from a previous value of () to its current value, (i.e., a th successful time-step has been taken). ivp_rk_interp_eval can then be called to evaluate interpolated approximations of the function or its derivatives at any value of in the interval .

References

Brankin, R W, Gladwell, I and Shampine, L F, 1991, RKSUITE: A suite of Runge–Kutta codes for the initial value problems for ODEs, SoftReport 91-S1, Southern Methodist University