naginterfaces.library.ode.ivp_adams_rootdiag(neqg, comm)[source]

ivp_adams_rootdiag is a diagnostic function which may be called after a call to the integrator functions ivp_adams_roots() or ivp_adams_roots_revcom().

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


The number of event functions defined for the integration function. It must be the same argument supplied to the setup function ivp_adams_setup() and to the integration function (ivp_adams_roots() or ivp_adams_roots_revcom()).

commdict, communication object

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


The index of the event equation for which the root has been detected.


Information about the root detected for the event equation defined by . The possible values of with their interpretations are as follows:

A simple root, or lack of distinguishing information available.

A root of even multiplicity is believed to have been detected, that is no change in sign of the event function was found.

A high-order root of odd multiplicity.

A possible root, but due to high multiplicity or a clustering of roots accurate evaluation of the event function was prohibited by round-off error and/or cancellation.

In general, the accuracy of the root is less reliable for values of .

eventsint, ndarray, shape

Information about the th event function on a very small interval containing the root, (see ivp_adams_roots() and ivp_adams_roots_revcom()), as output from the integration function. All roots lying in this interval are considered indistinguishable numerically and, therefore, should be regarded as defining a root at . The possible values of with their interpretations are as follows:

The th event function did not have a root.

The th event function changed sign from positive to negative about a root, in the direction of integration.

The th event function changed sign from negative to positive about a root, in the direction of integration.

A root was identified, but no change in sign was observed.

residsfloat, ndarray, shape

The value of the th event function computed at the root, (see ivp_adams_roots() and ivp_adams_roots_revcom()).

(errno )

On entry, and in ivp_adams_setup().

Constraint: in ivp_adams_setup().

(errno )

The integrator did not end at an event.

(errno )

Neither of the appropriate two integrator functions has been called.


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_rootdiag should be called only after a call to ivp_adams_roots() or ivp_adams_roots_revcom() results in the output value , indicating that a root has been detected. ivp_adams_rootdiag permits you to examine information about the root detected, such as the indices of the event equations for which there is a root, the type of root (odd or even) and the residuals of the event equations.