# NAG FL Interfaced03rzf (dim2_​gen_​order2_​rectilinear_​extractgrid)

## 1Purpose

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.

## 2Specification

Fortran Interface
 Subroutine d03rzf ( nlev, xmin, ymin, dxb, dyb, npts, x, y,
 Integer, Intent (In) :: level, nlev, lgrid(*), istruc(*), lenxy Integer, Intent (Inout) :: ifail Integer, Intent (Out) :: npts Real (Kind=nag_wp), Intent (In) :: xmin, ymin, dxb, dyb Real (Kind=nag_wp), Intent (Out) :: x(lenxy), y(lenxy)
#include <nag.h>
 void d03rzf_ (const Integer *level, const Integer *nlev, const double *xmin, const double *ymin, const double *dxb, const double *dyb, const Integer lgrid[], const Integer istruc[], Integer *npts, double x[], double y[], const Integer *lenxy, Integer *ifail)
The routine may be called by the names d03rzf or nagf_pde_dim2_gen_order2_rectilinear_extractgrid.

## 3Description

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 arguments nlev, xmin, ymin, dxb, dyb, lgrid and istruc to monitr must be passed unchanged to d03rzf.

None.

## 5Arguments

1: $\mathbf{level}$Integer Input
On entry: the grid level at which the coordinates are required.
Constraint: $1\le {\mathbf{level}}\le {\mathbf{nlev}}$.
2: $\mathbf{nlev}$Integer Input
3: $\mathbf{xmin}$Real (Kind=nag_wp) Input
4: $\mathbf{ymin}$Real (Kind=nag_wp) Input
5: $\mathbf{dxb}$Real (Kind=nag_wp) Input
6: $\mathbf{dyb}$Real (Kind=nag_wp) Input
On entry: nlev, xmin, ymin, dxb and dyb as supplied to monitr must be passed unchanged to d03rzf.
7: $\mathbf{lgrid}\left(*\right)$Integer array Input
Note: the dimension of the array lgrid must be at least ${\mathbf{nlev}}$.
On entry: lgrid as supplied to monitr must be passed unchanged to d03rzf.
8: $\mathbf{istruc}\left(*\right)$Integer array Input
Note: 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: istruc as supplied to monitr must be passed unchanged to d03rzf.
9: $\mathbf{npts}$Integer Output
On exit: the number of grid points in the grid level level.
10: $\mathbf{x}\left({\mathbf{lenxy}}\right)$Real (Kind=nag_wp) array Output
11: $\mathbf{y}\left({\mathbf{lenxy}}\right)$Real (Kind=nag_wp) array Output
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: $\mathbf{lenxy}$Integer Input
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: $\mathbf{ifail}$Integer Input/Output
On entry: ifail must be set to $0$, . If you are unfamiliar with this argument you should refer to Section 4 in the Introduction to the NAG Library FL Interface for details.
For environments where it might be inappropriate to halt program execution when an error is detected, the value 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 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).

## 6Error Indicators and Warnings

If on entry ${\mathbf{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:
${\mathbf{ifail}}=1$
On entry, ${\mathbf{level}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{level}}\ge 1$.
On entry, ${\mathbf{level}}=〈\mathit{\text{value}}〉$ and ${\mathbf{nlev}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{level}}\le {\mathbf{nlev}}$.
${\mathbf{ifail}}=2$
On entry, ${\mathbf{lenxy}}=〈\mathit{\text{value}}〉$.
Constraint: ${\mathbf{lenxy}}\ge 〈\mathit{\text{value}}〉$.
${\mathbf{ifail}}=-99$
See Section 7 in the Introduction to the NAG Library FL Interface for further information.
${\mathbf{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.
${\mathbf{ifail}}=-999$
Dynamic memory allocation failed.
See Section 9 in the Introduction to the NAG Library FL Interface for further information.

Not applicable.

## 8Parallelism and Performance

d03rzf is not threaded in any implementation.