D03 Chapter Contents
D03 Chapter Introduction
NAG Library Manual

# NAG Library Routine DocumentD03RZF

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

D03RZF is designed to be used in conjunction with D03RBF. It can be called from the MONITR to obtain the number of grid points and their $\left(x,y\right)$ coordinates on a solution grid.

## 2  Specification

 SUBROUTINE D03RZF ( LEVEL, NLEV, XMIN, YMIN, DXB, DYB, LGRID, ISTRUC, NPTS, X, Y, LENXY, IFAIL)
 INTEGER LEVEL, NLEV, LGRID(*), ISTRUC(*), NPTS, LENXY, IFAIL REAL (KIND=nag_wp) XMIN, YMIN, DXB, DYB, X(LENXY), Y(LENXY)

## 3  Description

D03RZF extracts the number of grid points and their $\left(x,y\right)$ coordinates on a specific solution grid produced by D03RBF. It must be called only from within the MONITR. The parameters NLEV, XMIN, YMIN, DXB, DYB, LGRID and ISTRUC to MONITR must be passed unchanged to D03RZF.

None.

## 5  Parameters

1:     LEVEL – INTEGERInput
On entry: the grid level at which the coordinates are required.
Constraint: $1\le {\mathbf{LEVEL}}\le {\mathbf{NLEV}}$.
2:     NLEV – INTEGERInput
3:     XMIN – REAL (KIND=nag_wp)Input
4:     YMIN – REAL (KIND=nag_wp)Input
5:     DXB – REAL (KIND=nag_wp)Input
6:     DYB – REAL (KIND=nag_wp)Input
7:     LGRID($*$) – INTEGER arrayInput
8:     ISTRUC($*$) – INTEGER arrayInput
Note: the dimension of the array LGRID must be at least ${\mathbf{NLEV}}$.
The dimension of the array ISTRUC must be at least ${\mathbf{LGRID}}\left({\mathbf{NLEV}}\right)+2×\mathit{nrows}+{\mathbf{NPTS}}+1$ where $\mathit{nrows}$ is stored in ${\mathbf{ISTRUC}}\left({\mathbf{LGRID}}\left({\mathbf{NLEV}}\right)\right)$ and is the number of rows in the grid at level NLEV.
On entry: NLEV, XMIN, YMIN, DXB, DYB, LGRID and ISTRUC as supplied to MONITR must be passed unchanged to D03RZF.
9:     NPTS – INTEGEROutput
On exit: the number of grid points in the grid level LEVEL.
10:   X(LENXY) – REAL (KIND=nag_wp) arrayOutput
11:   Y(LENXY) – REAL (KIND=nag_wp) arrayOutput
On exit: ${\mathbf{X}}\left(\mathit{i}\right)$ and ${\mathbf{Y}}\left(\mathit{i}\right)$ contain the $\left(x,y\right)$ coordinates respectively of the $\mathit{i}$th grid point, for $\mathit{i}=1,2,\dots ,{\mathbf{NPTS}}$.
12:   LENXY – INTEGERInput
On entry: the dimension of the arrays X and Y as declared in the (sub)program from which D03RZF is called.
Constraint: ${\mathbf{LENXY}}\ge {\mathbf{NPTS}}$.
13:   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$
 On entry, ${\mathbf{LEVEL}}<1$, or ${\mathbf{LEVEL}}>{\mathbf{NLEV}}$.
${\mathbf{IFAIL}}=2$
The dimension of the arrays X and Y is too small for the requested grid level, i.e., ${\mathbf{LENXY}}<{\mathbf{NPTS}}$.

Not applicable.