D02 Chapter Contents
D02 Chapter Introduction
NAG Library Manual

NAG Library Routine DocumentD02NYF

Note:  before using this routine, please read the Users' Note for your implementation to check the interpretation of bold italicised terms and other implementation-dependent details.

1  Purpose

D02NYF is a diagnostic routine which you may call either after any user-specified exit or after a mid-integration error exit from any of those integrators in sub-chapter D02M–N that use methods set up by calls to D02MVF, D02NVF or D02NWF.

2  Specification

 SUBROUTINE D02NYF ( NEQ, NEQMAX, HU, H, TCUR, TOLSF, RWORK, NST, NRE, NJE, NQU, NQ, NITER, IMXER, ALGEQU, INFORM, IFAIL)
 INTEGER NEQ, NEQMAX, NST, NRE, NJE, NQU, NQ, NITER, IMXER, INFORM(23), IFAIL REAL (KIND=nag_wp) HU, H, TCUR, TOLSF, RWORK(50+4*NEQ) LOGICAL ALGEQU(NEQ)

3  Description

D02NYF permits you to inspect statistics produced by any integrator in this sub-chapter that has been set up a call to one of D02MVF, D02NVF or D02NWF. These statistics concern the integration only.

4  References

See the D02M–N sub-chapter Introduction.

5  Parameters

1:     NEQ – INTEGERInput
On entry: the value used for the parameter NEQ when calling the integrator.
Constraint: ${\mathbf{NEQ}}\ge 1$.
2:     NEQMAX – INTEGERInput
On entry: the value used for the parameter NEQMAX when calling the integrator.
Constraint: ${\mathbf{NEQMAX}}\ge {\mathbf{NEQ}}$.
3:     HU – REAL (KIND=nag_wp)Output
On exit: the last successful step size.
4:     H – REAL (KIND=nag_wp)Output
On exit: the proposed next step size for continuing the integration.
5:     TCUR – REAL (KIND=nag_wp)Output
On exit: $t$, the value of the independent variable which the integrator has actually reached. TCUR will always be at least as far as the output value of the argument $t$ in the direction of integration, but may be further (if overshooting and interpolation at TOUT was specified, e.g., see D02NBF).
6:     TOLSF – REAL (KIND=nag_wp)Output
On exit: a tolerance scale factor, ${\mathbf{TOLSF}}\ge 1.0$, which is computed when a request for too much accuracy is detected by the integrator (indicated by a return with ${\mathbf{IFAIL}}={\mathbf{3}}$ or ${\mathbf{14}}$). If ITOL is left unaltered but RTOL and ATOL are uniformly scaled up by a factor of TOLSF the next call to the integrator is deemed likely to succeed.
7:     RWORK($50+4×{\mathbf{NEQ}}$) – REAL (KIND=nag_wp) arrayCommunication Array
On entry: contains information supplied by the integrator.
8:     NST – INTEGEROutput
On exit: the number of steps taken in the integration so far.
9:     NRE – INTEGEROutput
On exit: the number of function or residual evaluations (FCN (e.g., see D02NBF) or RESID (e.g., see D02NGF) calls) used in the integration so far.
10:   NJE – INTEGEROutput
On exit: the number of Jacobian evaluations used in the integration so far. This equals the number of matrix $LU$ decompositions.
11:   NQU – INTEGEROutput
On exit: the order of the method last used (successfully) in the integration.
12:   NQ – INTEGEROutput
On exit: the proposed order of the method for continuing the integration.
13:   NITER – INTEGEROutput
On exit: the number of iterations performed in the integration so far by the nonlinear equation solver.
14:   IMXER – INTEGEROutput
On exit: the index of the component of largest magnitude in the weighted local error vector $\left({e}_{\mathit{i}}/{w}_{\mathit{i}}\right)$, for $\mathit{i}=1,2,\dots ,{\mathbf{NEQ}}$.
15:   ALGEQU(NEQ) – LOGICAL arrayOutput
On exit: ${\mathbf{ALGEQU}}\left(\mathit{i}\right)=\mathrm{.TRUE.}$ if the $\mathit{i}$th equation integrated was detected to be algebraic, otherwise ${\mathbf{ALGEQU}}\left(\mathit{i}\right)=\mathrm{.FALSE.}$. Note that when the integrators for explicit equations are being used, then ${\mathbf{ALGEQU}}\left(\mathit{i}\right)=\mathrm{.FALSE.}$, for $\mathit{i}=1,2,\dots ,{\mathbf{NEQ}}$.
16:   INFORM($23$) – INTEGER arrayCommunication Array
On entry: contains information supplied by the integrator.
17:   IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to $0$, $-1\text{​ or ​}1$. If you are unfamiliar with this parameter you should refer to Section 3.3 in the Essential Introduction for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value $-1\text{​ or ​}1$ is recommended. If the output of error messages is undesirable, then the value $1$ is recommended. Otherwise, if you are not familiar with this parameter, the recommended value is $0$. When the value $-\mathbf{1}\text{​ or ​}\mathbf{1}$ is used it is essential to test the value of IFAIL on exit.
On exit: ${\mathbf{IFAIL}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

6  Error Indicators and Warnings

If on entry ${\mathbf{IFAIL}}={\mathbf{0}}$ or $-{\mathbf{1}}$, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
${\mathbf{IFAIL}}=1$
 On entry, ${\mathbf{NEQ}}<1$, or ${\mathbf{NEQMAX}}<1$, or ${\mathbf{NEQ}}>{\mathbf{NEQMAX}}$.

Not applicable.