# NAG FL Interfaced02nyf (ivp_​stiff_​integ_​diag)

## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

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.

## 2Specification

Fortran Interface
 Subroutine d02nyf ( neq, hu, h, tcur, nst, nre, nje, nqu, nq,
 Integer, Intent (In) :: neq, neqmax, inform(23) Integer, Intent (Inout) :: ifail Integer, Intent (Out) :: nst, nre, nje, nqu, nq, niter, imxer Real (Kind=nag_wp), Intent (In) :: rwork(50+4*neq) Real (Kind=nag_wp), Intent (Out) :: hu, h, tcur, tolsf Logical, Intent (Out) :: algequ(neq)
#include <nag.h>
 void d02nyf_ (const Integer *neq, const Integer *neqmax, double *hu, double *h, double *tcur, double *tolsf, const double rwork[], Integer *nst, Integer *nre, Integer *nje, Integer *nqu, Integer *nq, Integer *niter, Integer *imxer, logical algequ[], const Integer inform[], Integer *ifail)
The routine may be called by the names d02nyf or nagf_ode_ivp_stiff_integ_diag.

## 3Description

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.

## 4References

See the D02M–N Sub-chapter Introduction.

## 5Arguments

1: $\mathbf{neq}$Integer Input
On entry: the value used for the argument neq when calling the integrator.
Constraint: ${\mathbf{neq}}\ge 1$.
2: $\mathbf{neqmax}$Integer Input
On entry: the value used for the argument neqmax when calling the integrator.
Constraint: ${\mathbf{neqmax}}\ge {\mathbf{neq}}$.
3: $\mathbf{hu}$Real (Kind=nag_wp) Output
On exit: the last successful step size.
4: $\mathbf{h}$Real (Kind=nag_wp) Output
On exit: the proposed next step size for continuing the integration.
5: $\mathbf{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: $\mathbf{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: $\mathbf{rwork}\left(50+4×{\mathbf{neq}}\right)$Real (Kind=nag_wp) array Communication Array
On entry: contains information supplied by the integrator.
8: $\mathbf{nst}$Integer Output
On exit: the number of steps taken in the integration so far.
9: $\mathbf{nre}$Integer Output
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: $\mathbf{nje}$Integer Output
On exit: the number of Jacobian evaluations used in the integration so far. This equals the number of matrix $LU$ decompositions.
11: $\mathbf{nqu}$Integer Output
On exit: the order of the method last used (successfully) in the integration.
12: $\mathbf{nq}$Integer Output
On exit: the proposed order of the method for continuing the integration.
13: $\mathbf{niter}$Integer Output
On exit: the number of iterations performed in the integration so far by the nonlinear equation solver.
14: $\mathbf{imxer}$Integer Output
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: $\mathbf{algequ}\left({\mathbf{neq}}\right)$Logical array Output
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: $\mathbf{inform}\left(23\right)$Integer array Communication Array
On entry: contains information supplied by the integrator.
17: $\mathbf{ifail}$Integer Input/Output
On entry: ifail must be set to $0$, $-1$ or $1$ to set behaviour on detection of an error; these values have no effect when no error is detected.
A value of $0$ causes the printing of an error message and program execution will be halted; otherwise program execution continues. A value of $-1$ means that an error message is printed while a value of $1$ means that it is not.
If halting is not appropriate, the value $-1$ or $1$ is recommended. If message printing is undesirable, then the value $1$ is recommended. Otherwise, the value $0$ is recommended. When the value $-\mathbf{1}$ 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).

## 6Error Indicators and Warnings

If on entry ${\mathbf{ifail}}=0$ or $-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}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{neq}}\ge 1$.
On entry, ${\mathbf{neq}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{neqmax}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{neq}}\le {\mathbf{neqmax}}$.
On entry, ${\mathbf{neqmax}}=⟨\mathit{\text{value}}⟩$.
Constraint: ${\mathbf{neqmax}}\ge 1$.
${\mathbf{ifail}}=-99$
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-399$
Your licence key may have expired or may not have been installed correctly.
See Section 8 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

Not applicable.

## 8Parallelism and Performance

d02nyf is not threaded in any implementation.