## ▸▿ Contents

Settings help

FL Name Style:

FL Specification Language:

## 1Purpose

d02qxf is a diagnostic routine which may be called after a call to either of the integration routines d02qff and d02qgf.

## 2Specification

Fortran Interface
 Subroutine d02qxf ( neqf, yp,
 Integer, Intent (In) :: neqf, lrwork, iwork(liwork), liwork Integer, Intent (Inout) :: ifail Integer, Intent (Out) :: odlast, odnext, nsucc, nfail, badcmp Real (Kind=nag_wp), Intent (In) :: rwork(lrwork) Real (Kind=nag_wp), Intent (Out) :: yp(neqf), tcurr, hlast, hnext, tolfac
#include <nag.h>
 void d02qxf_ (const Integer *neqf, double yp[], double *tcurr, double *hlast, double *hnext, Integer *odlast, Integer *odnext, Integer *nsucc, Integer *nfail, double *tolfac, Integer *badcmp, const double rwork[], const Integer *lrwork, const Integer iwork[], const Integer *liwork, Integer *ifail)
The routine may be called by the names d02qxf or nagf_ode_ivp_adams_diag.

## 3Description

d02qxf permits you to extract information about the performance of d02qff or d02qgf. It may only be called after a call to d02qff or d02qgf.

None.

## 5Arguments

1: $\mathbf{neqf}$Integer Input
On entry: the number of first-order ordinary differential equations solved by the integration routine. It must be the same argument neqf supplied to the setup routine d02qwf and the integration routines d02qff or d02qgf.
2: $\mathbf{yp}\left({\mathbf{neqf}}\right)$Real (Kind=nag_wp) array Output
On exit: the approximate derivative of the solution component ${y}_{i}$, as supplied in ${y}_{i}$ on output from the integration routine at the output value of t. These values are obtained by the evaluation of ${y}^{\prime }=f\left(x,y\right)$ except when the output value of the argument t in the call to the integration routine is tout and ${\mathbf{tcurr}}\ne {\mathbf{tout}}$, in which case they are obtained by interpolation.
3: $\mathbf{tcurr}$Real (Kind=nag_wp) Output
On exit: the value of the independent variable which the integrator has actually reached. tcurr will always be at least as far as the output value of the argument t (from the integration routine) in the direction of integration, but may be further.
4: $\mathbf{hlast}$Real (Kind=nag_wp) Output
On exit: the last successful step size used by the integrator.
5: $\mathbf{hnext}$Real (Kind=nag_wp) Output
On exit: the next step size which the integration routine would attempt.
6: $\mathbf{odlast}$Integer Output
On exit: the order of the method last used (successfully) by the integration routine.
7: $\mathbf{odnext}$Integer Output
On exit: the order of the method which the integration routine would attempt on the next step.
8: $\mathbf{nsucc}$Integer Output
On exit: the number of steps attempted by the integration routine that have been successful since the start of the current problem.
9: $\mathbf{nfail}$Integer Output
On exit: the number of steps attempted by the integration routine that have failed since the start of the current problem.
10: $\mathbf{tolfac}$Real (Kind=nag_wp) Output
On exit: a tolerance scale factor, ${\mathbf{tolfac}}\ge 1.0$, returned when the integration routine exits with ${\mathbf{ifail}}={\mathbf{3}}$. If rtol and atol are uniformly scaled up by a factor of tolfac and d02qwf is called, the next call to the integration routine is deemed likely to succeed.
11: $\mathbf{badcmp}$Integer Output
On exit: if the integration routine returned with ${\mathbf{ifail}}={\mathbf{4}}$, badcmp specifies the index of the component which forced the error exit. Otherwise badcmp is $0$.
12: $\mathbf{rwork}\left({\mathbf{lrwork}}\right)$Real (Kind=nag_wp) array Communication Array
On entry: this must be the same argument rwork as supplied to d02qff or d02qgf. It is used to pass information from the integration routine to d02qxf and, therefore, the contents of this array must not be changed before calling d02qxf.
13: $\mathbf{lrwork}$Integer Input
On entry: the dimension of the array rwork as declared in the (sub)program from which d02qxf is called.
This must be the same argument lrwork as supplied to d02qwf.
14: $\mathbf{iwork}\left({\mathbf{liwork}}\right)$Integer array Communication Array
On entry: this must be the same argument iwork as supplied to d02qff or d02qgf. It is used to pass information from the integration routine to d02qxf and, therefore, the contents of this array must not be changed before calling d02qxf.
15: $\mathbf{liwork}$Integer Input
On entry: the dimension of the array iwork as declared in the (sub)program from which d02qxf is called.
This must be the same argument liwork as supplied to d02qwf.
16: $\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$
Neither of the appropriate two integrator routines has been called.
On entry, ${\mathbf{liwork}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{liwork}}=⟨\mathit{\text{value}}⟩$ in d02qwf.
Constraint: ${\mathbf{liwork}}={\mathbf{liwork}}$ in d02qwf.
On entry, ${\mathbf{lrwork}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{lrwork}}=⟨\mathit{\text{value}}⟩$ in d02qwf.
Constraint: ${\mathbf{lrwork}}={\mathbf{lrwork}}$ in d02qwf.
On entry, ${\mathbf{neqf}}=⟨\mathit{\text{value}}⟩$ and ${\mathbf{neqf}}=⟨\mathit{\text{value}}⟩$ in d02qwf.
Constraint: ${\mathbf{neqf}}={\mathbf{neqf}}$ in d02qwf.
${\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.