naginterfaces.library.ode.ivp_​rkts_​errass

naginterfaces.library.ode.ivp_rkts_errass(n, comm)[source]

ivp_rkts_errass provides details about global error assessment computed during an integration with either ivp_rkts_range(), ivp_rkts_onestep() or ivp_rk_step_revcomm().

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

https://www.nag.com/numeric/nl/nagdoc_29.3/flhtml/d02/d02puf.html

Parameters
nint

, the number of ordinary differential equations in the system to be solved by the integration function.

commdict, communication object, modified in place

Communication structure.

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

Returns
rmserrfloat, ndarray, shape

approximates the RMS average of the true error of the numerical solution for the th solution component, for . The average is taken over all steps from the beginning of the integration to the current integration point.

errmaxfloat

The maximum weighted approximate true error taken over all solution components and all steps.

terrmxfloat

The first value of the independent variable where an approximate true error attains the maximum value, .

Raises
NagValueError
(errno )

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

(errno )

No error assessment is available since the integrator has not actually taken any successful steps.

(errno )

No error assessment is available since you did not ask for it in your call to the setup function.

(errno )

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

(errno )

You have already made one call to this function after the integrator could not achieve specified accuracy.

You cannot call this function again.

(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

ivp_rkts_errass and its associated functions (ivp_rkts_range(), ivp_rkts_onestep(), ivp_rk_step_revcomm(), ivp_rk_interp_setup(), ivp_rk_interp_eval(), ivp_rkts_setup(), ivp_rkts_reset_tend(), ivp_rkts_interp() and ivp_rkts_diag()) 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.

After a call to ivp_rkts_range(), ivp_rkts_onestep() or ivp_rk_step_revcomm(), ivp_rkts_errass can be called for information about error assessment, if this assessment was specified in the setup function ivp_rkts_setup(). A more accurate ‘true’ solution is computed in a secondary integration. The error is measured as specified in ivp_rkts_setup() for local error control. At each step in the primary integration, an average magnitude of component is computed, and the error in the component is

It is difficult to estimate reliably the true error at a single point. For this reason the RMS (root-mean-square) average of the estimated global error in each solution component is computed. This average is taken over all steps from the beginning of the integration through to the current integration point. If all has gone well, the average errors reported will be comparable to (see ivp_rkts_setup()). The maximum error seen in any component in the integration so far and the point where the maximum error first occurred are also reported.

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