D02NYF (PDF version)
D02 Chapter Contents
D02 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

D02NYF

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.

+ Contents

    1  Purpose
    7  Accuracy
    9  Example

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: NEQ1.
2:     NEQMAX – INTEGERInput
On entry: the value used for the parameter 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) 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 ei/wi, for i=1,2,,NEQ.
15:   ALGEQU(NEQ) – LOGICAL arrayOutput
On exit: ALGEQUi=.TRUE. if the ith equation integrated was detected to be algebraic, otherwise ALGEQUi=.FALSE.. Note that when the integrators for explicit equations are being used, then ALGEQUi=.FALSE., for i=1,2,,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​ 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​ 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 -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<1,
orNEQMAX<1,
orNEQ>NEQMAX.

7  Accuracy

Not applicable.

8  Further Comments

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

9  Example

See Section 9 in D02NBF.

D02NYF (PDF version)
D02 Chapter Contents
D02 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012