NAG FL Interface
d02nyf (ivp_​stiff_​integ_​diag)

Settings help

FL Name Style:


FL Specification Language:


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

Fortran Interface
Subroutine d02nyf ( neq, neqmax, hu, h, tcur, tolsf, rwork, nst, nre, nje, nqu, nq, niter, imxer, algequ, inform, ifail)
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)
C Header Interface
#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.

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 Arguments

1: neq Integer Input
On entry: the value used for the argument neq when calling the integrator.
Constraint: neq1.
2: neqmax Integer Input
On entry: the value used for the argument neqmax when calling the integrator.
Constraint: neqmaxneq.
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, tolsf1.0, which is computed when a request for too much accuracy is detected by the integrator (indicated by a return with ifail=3 or 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×neq) Real (Kind=nag_wp) array Communication Array
On entry: contains information supplied by the integrator.
8: nst Integer Output
On exit: the number of steps taken in the integration so far.
9: 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: 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: nqu Integer Output
On exit: the order of the method last used (successfully) in the integration.
12: nq Integer Output
On exit: the proposed order of the method for continuing the integration.
13: niter Integer Output
On exit: the number of iterations performed in the integration so far by the nonlinear equation solver.
14: imxer Integer Output
On exit: the index of the component of largest magnitude in the weighted local error vector (ei/wi), for i=1,2,,neq.
15: algequ(neq) Logical array Output
On exit: algequ(i)=.TRUE. if the ith equation integrated was detected to be algebraic, otherwise algequ(i)=.FALSE.. Note that when the integrators for explicit equations are being used, then algequ(i)=.FALSE., for i=1,2,,neq.
16: inform(23) Integer array Communication Array
On entry: contains information supplied by the integrator.
17: 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 -1 or 1 is used it is essential to test the value of ifail on exit.
On exit: ifail=0 unless the routine detects an error or a warning has been flagged (see Section 6).

6 Error Indicators and Warnings

If on entry 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:
ifail=1
On entry, neq=value.
Constraint: neq1.
On entry, neq=value and neqmax=value.
Constraint: neqneqmax.
On entry, neqmax=value.
Constraint: neqmax1.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
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.
ifail=-999
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

7 Accuracy

Not applicable.

8 Parallelism and Performance

Background information to multithreading can be found in the Multithreading documentation.
d02nyf is not threaded in any implementation.

9 Further Comments

Statistics for sparse matrix linear algebra calls (if appropriate) may be determined by a call to d02nxf.

10 Example

See d02nbf.