NAG FL Interface
d02qxf (ivp_​adams_​diag)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

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

2 Specification

Fortran Interface
Subroutine d02qxf ( neqf, yp, tcurr, hlast, hnext, odlast, odnext, nsucc, nfail, tolfac, badcmp, rwork, lrwork, iwork, liwork, ifail)
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
C Header Interface
#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.

3 Description

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.

4 References

None.

5 Arguments

1: 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: yp(neqf) Real (Kind=nag_wp) array Output
On exit: the approximate derivative of the solution component yi, as supplied in yi on output from the integration routine at the output value of t. These values are obtained by the evaluation of y=f(x,y) except when the output value of the argument t in the call to the integration routine is tout and tcurrtout, in which case they are obtained by interpolation.
3: 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: hlast Real (Kind=nag_wp) Output
On exit: the last successful step size used by the integrator.
5: hnext Real (Kind=nag_wp) Output
On exit: the next step size which the integration routine would attempt.
6: odlast Integer Output
On exit: the order of the method last used (successfully) by the integration routine.
7: odnext Integer Output
On exit: the order of the method which the integration routine would attempt on the next step.
8: 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: 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: tolfac Real (Kind=nag_wp) Output
On exit: a tolerance scale factor, tolfac1.0, returned when the integration routine exits with ifail=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: badcmp Integer Output
On exit: if the integration routine returned with ifail=4, badcmp specifies the index of the component which forced the error exit. Otherwise badcmp is 0.
12: rwork(lrwork) 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: 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: iwork(liwork) 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: 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: 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
Neither of the appropriate two integrator routines has been called.
On entry, liwork=value and liwork=value in d02qwf.
Constraint: liwork=liwork in d02qwf.
On entry, lrwork=value and lrwork=value in d02qwf.
Constraint: lrwork=lrwork in d02qwf.
On entry, neqf=value and neqf=value in d02qwf.
Constraint: neqf=neqf in d02qwf.
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.
d02qxf 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.
d02qxf is not threaded in any implementation.

9 Further Comments

You should call d02qyf for information about any roots detected by d02qff or d02qgf.

10 Example

See d02qff.