NAG Library Routine Document

d02lyf  (ivp_2nd_rkn_diag)

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1
Purpose

d02lyf is a diagnostic routine which may be called after a call of the integrator d02laf.

2
Specification

Fortran Interface
Subroutine d02lyf ( neq, hnext, hused, hstart, nsucc, nfail, natt, thres, thresp, rwork, lrwork, ifail)
Integer, Intent (In):: neq, lrwork
Integer, Intent (Inout):: ifail
Integer, Intent (Out):: nsucc, nfail, natt
Real (Kind=nag_wp), Intent (In):: rwork(lrwork)
Real (Kind=nag_wp), Intent (Out):: hnext, hused, hstart, thres(neq), thresp(neq)
C Header Interface
#include nagmk26.h
void  d02lyf_ ( const Integer *neq, double *hnext, double *hused, double *hstart, Integer *nsucc, Integer *nfail, Integer *natt, double thres[], double thresp[], const double rwork[], const Integer *lrwork, Integer *ifail)

3
Description

d02lyf permits you to extract information about the performance of d02laf and the setting of some optional parameters. It may be called only after a call of d02laf.

4
References

None.

5
Arguments

1:     neq – IntegerInput
On entry: the number of second-order ordinary differential equations solved by d02laf. It must be the same as the argument neq supplied to d02laf and d02lxf.
2:     hnext – Real (Kind=nag_wp)Output
On exit: the next step size which d02laf, if called, would attempt.
3:     hused – Real (Kind=nag_wp)Output
On exit: the last successful step size used by d02laf.
4:     hstart – Real (Kind=nag_wp)Output
On exit: the initial step size used on the current integration problem by d02laf.
5:     nsucc – IntegerOutput
On exit: the number of steps attempted by d02laf that have been successful since the start of the current problem.
6:     nfail – IntegerOutput
On exit: the number of steps attempted by d02laf that have failed since the start of the current problem.
7:     natt – IntegerOutput
On exit: the number of steps attempted before the initial step was successful. Over a large number of problems the cost of an attempted step of this type is approximately half that of a normal attempted step.
8:     thresneq – Real (Kind=nag_wp) arrayOutput
On exit: the ith solution threshold value used in the error control strategy. (See d02lxf.)
9:     threspneq – Real (Kind=nag_wp) arrayOutput
On exit: the ith derivative threshold value used in the error control strategy. (See d02lxf.)
10:   rworklrwork – Real (Kind=nag_wp) arrayCommunication Array
On entry: this must be the same argument rwork as supplied to d02laf. It is used to pass information from d02laf to d02lyf and therefore the contents of this array must not be changed before calling d02lyf.
11:   lrwork – IntegerInput
On entry: the dimension of the array rwork as declared in the (sub)program from which d02lyf is called.
This must be the same argument lrwork as supplied to d02lxf.
12:   ifail – IntegerInput/Output
On entry: ifail must be set to 0, -1​ or ​1. If you are unfamiliar with this argument you should refer to Section 3.4 in How to Use the NAG Library and its Documentation 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 argument, 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
d02laf has not been called, or one or both of the arguments neq and lrwork does not match the corresponding argument supplied to d02lxf.
This error exit can be caused if elements of rwork have been overwritten.
ifail=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 3.9 in How to Use the NAG Library and its Documentation for further information.
ifail=-399
Your licence key may have expired or may not have been installed correctly.
See Section 3.8 in How to Use the NAG Library and its Documentation for further information.
ifail=-999
Dynamic memory allocation failed.
See Section 3.7 in How to Use the NAG Library and its Documentation for further information.

7
Accuracy

Not applicable.

8
Parallelism and Performance

d02lyf is not thread safe and should not be called from a multithreaded user program. Please see Section 3.12.1 in How to Use the NAG Library and its Documentation for more information on thread safety.
d02lyf is not threaded in any implementation.

9
Further Comments

None.

10
Example

See Section 10 in d02laf.
© The Numerical Algorithms Group Ltd, Oxford, UK. 2017