NAG FL Interface
d02lyf (ivp_​2nd_​rkn_​diag)

Settings help

FL Name Style:


FL Specification Language:


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 <nag.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)
The routine may be called by the names d02lyf or nagf_ode_ivp_2nd_rkn_diag.

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 Integer Input
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 Integer Output
On exit: the number of steps attempted by d02laf that have been successful since the start of the current problem.
6: nfail Integer Output
On exit: the number of steps attempted by d02laf that have failed since the start of the current problem.
7: natt Integer Output
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: thres(neq) Real (Kind=nag_wp) array Output
On exit: the ith solution threshold value used in the error control strategy. (See d02lxf.)
9: thresp(neq) Real (Kind=nag_wp) array Output
On exit: the ith derivative threshold value used in the error control strategy. (See d02lxf.)
10: rwork(lrwork) Real (Kind=nag_wp) array Communication 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 Integer Input
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 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, lrwork=value, but in a previous call to the setup routine lrwork=value.
On entry, neq=value, but in the previous call to the setup routine neq=value.
The integrator routine d02laf has not been called.
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

d02lyf is not thread safe and should not be called from a multithreaded user program. Please see Section 1 in FL Interface Multithreading for more information on thread safety.
d02lyf is not threaded in any implementation.

9 Further Comments

None.

10 Example

See d02laf.