# naginterfaces.library.ode.ivp_​rkts_​reset_​tend¶

naginterfaces.library.ode.ivp_rkts_reset_tend(tendnu, comm)[source]

ivp_rkts_reset_tend resets the end point in an integration performed by ivp_rkts_onestep() and ivp_rk_step_revcomm().

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

https://www.nag.com/numeric/nl/nagdoc_28.6/flhtml/d02/d02prf.html

Parameters
tendnufloat

The new value for .

commdict, communication object, modified in place

Communication structure.

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

Raises
NagValueError
(errno )

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

(errno )

You cannot call this function after the integrator has returned an error.

(errno )

You cannot call this function before you have called the step integrator.

(errno )

You cannot call this function when the range integrator has been used.

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

(errno )

On entry, is not beyond (step integrator) in the direction of integration.

The direction is positive, and .

(errno )

On entry, is not beyond (step integrator) in the direction of integration.

The direction is negative, and .

(errno )

On entry, is too close to (step integrator). Their difference is , but this quantity must be at least .

Notes

ivp_rkts_reset_tend and its associated functions (ivp_rkts_setup(), ivp_rkts_onestep(), ivp_rk_step_revcomm(), ivp_rk_interp_setup(), ivp_rk_interp_eval(), ivp_rkts_interp(), ivp_rkts_diag() and ivp_rkts_errass()) solve the initial value problem for a first-order system of ordinary differential equations. The functions, based on Runge–Kutta methods and derived from RKSUITE (see Brankin et al. (1991)), integrate

where is the vector of solution components and is the independent variable.

ivp_rkts_reset_tend is used to reset the final value of the independent variable, , when the integration is already underway. It can be used to extend or reduce the range of integration. The new value must be beyond the current value of the independent variable (as returned in by ivp_rkts_onestep() or ivp_rk_step_revcomm()) in the current direction of integration. It is much more efficient to use ivp_rkts_reset_tend for this purpose than to use ivp_rkts_setup() which involves the overhead of a complete restart of the integration.

If you want to change the direction of integration then you must restart by a call to ivp_rkts_setup().

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