NAG Library Routine Document

d02nzf  (ivp_stiff_contin)

 Contents

    1  Purpose
    7  Accuracy
    10  Example

1
Purpose

d02nzf is a setup routine which must be called, if optional inputs need resetting, prior to a continuation call to 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 d02nzf ( neqmax, tcrit, h, hmin, hmax, maxstp, mxhnil, rwork, ifail)
Integer, Intent (In):: neqmax, maxstp, mxhnil
Integer, Intent (Inout):: ifail
Real (Kind=nag_wp), Intent (In):: tcrit, h, hmin, hmax
Real (Kind=nag_wp), Intent (Inout):: rwork(50+4*neqmax)
C Header Interface
#include nagmk26.h
void  d02nzf_ ( const Integer *neqmax, const double *tcrit, const double *h, const double *hmin, const double *hmax, const Integer *maxstp, const Integer *mxhnil, double rwork[], Integer *ifail)

3
Description

d02nzf is provided to permit you to reset many of the arguments which control the integration ‘on the fly’, that is in conjunction with the interrupt facility permitted through the argument itask of the integrator (e.g., see d02nbf). In addition to a number of arguments which you can set initially through one of the integrator setup routines, the step size to be attempted on the next step may be changed.

4
References

See the D02M–N Sub-chapter Introduction.

5
Arguments

1:     neqmax – IntegerInput
On entry: the value used for the argument neqmax when calling the integrator.
Constraint: neqmax1.
2:     tcrit – Real (Kind=nag_wp)Input
On entry: a point beyond which integration must not be attempted. The use of tcrit is described under the argument itask in the specification for the integrator (e.g., see d02nbf). A value, 0.0 say, must be specified even if itask subsequently specifies that tcrit will not be used.
3:     h – Real (Kind=nag_wp)Input
On entry: the next step size to be attempted. Set h=0.0 if the current value of h is not to be changed.
4:     hmin – Real (Kind=nag_wp)Input
On entry: the minimum absolute step size to be allowed. Set hmin=0.0 if this option is not required. Set hmin<0.0 if the current value of hmin is not to be changed.
5:     hmax – Real (Kind=nag_wp)Input
On entry: the maximum absolute step size to be allowed. Set hmax=0.0 if this option is not required. Set hmax<0.0 if the current value of hmax is not to be changed.
6:     maxstp – IntegerInput
On entry: the maximum number of steps to be attempted during one call to the integrator after which it will return with ifail=2 (see d02ncf). Set maxstp=0 if this option is not required. Set maxstp<0 if the current value of maxstp is not to be changed.
7:     mxhnil – IntegerInput
On entry: the maximum number of warnings printed (if itrace0, e.g., see d02nbf) per problem when t+h=t on a step (h=​ current step size). If mxhnil0, a default value of 10 is assumed.
8:     rwork50+4×neqmax – Real (Kind=nag_wp) arrayCommunication Array
This must be the same workspace array as the array rwork supplied to the integrator. It is used to pass information from the integrator to d02nzf and therefore its contents must not be changed before calling d02nzf.
9:     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
neqmax<1.
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

d02nzf is not threaded in any implementation.

9
Further Comments

None.

10
Example

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