D02 Chapter Contents
D02 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentD02NZF

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.

## 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

 SUBROUTINE D02NZF ( NEQMAX, TCRIT, H, HMIN, HMAX, MAXSTP, MXHNIL, RWORK, IFAIL)
 INTEGER NEQMAX, MAXSTP, MXHNIL, IFAIL REAL (KIND=nag_wp) TCRIT, H, HMIN, HMAX, RWORK(50+4*NEQMAX)

## 3  Description

D02NZF is provided to permit you to reset many of the parameters which control the integration ‘on the fly’, that is in conjunction with the interrupt facility permitted through the parameter ITASK of the integrator (e.g., see D02NBF). In addition to a number of parameters 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  Parameters

1:     NEQMAX – INTEGERInput
On entry: the value used for the parameter NEQMAX when calling the integrator.
Constraint: ${\mathbf{NEQMAX}}\ge 1$.
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 parameter 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 ${\mathbf{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 ${\mathbf{HMIN}}=0.0$ if this option is not required. Set ${\mathbf{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 ${\mathbf{HMAX}}=0.0$ if this option is not required. Set ${\mathbf{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 ${\mathbf{IFAIL}}={\mathbf{2}}$ (see D02NCF). Set ${\mathbf{MAXSTP}}=0$ if this option is not required. Set ${\mathbf{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 ${\mathbf{ITRACE}}\ge 0$, e.g., see D02NBF) per problem when $t+h=t$ on a step ($h=\text{​ current step size}$). If ${\mathbf{MXHNIL}}\le 0$, a default value of $10$ is assumed.
8:     RWORK($50+4×{\mathbf{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\text{​ 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\text{​ 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 $-\mathbf{1}\text{​ or ​}\mathbf{1}$ is used it is essential to test the value of IFAIL on exit.
On exit: ${\mathbf{IFAIL}}={\mathbf{0}}$ unless the routine detects an error or a warning has been flagged (see Section 6).

## 6  Error Indicators and Warnings

If on entry ${\mathbf{IFAIL}}={\mathbf{0}}$ or $-{\mathbf{1}}$, explanatory error messages are output on the current error message unit (as defined by X04AAF).
Errors or warnings detected by the routine:
${\mathbf{IFAIL}}=1$
${\mathbf{NEQMAX}}<1$.

Not applicable.