D03RZF (PDF version)
D03 Chapter Contents
D03 Chapter Introduction
NAG Library Manual

NAG Library Routine Document

D03RZF

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.

 Contents

    1  Purpose
    7  Accuracy
    10  Example

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 x,y 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 x,y 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.

4  References

None.

5  Parameters

1:     LEVEL – INTEGERInput
On entry: the grid level at which the coordinates are required.
Constraint: 1LEVELNLEV.
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
On entry: NLEV, XMIN, YMIN, DXB and DYB as supplied to MONITR must be passed unchanged to D03RZF.
7:     LGRID* – INTEGER arrayInput
Note: the dimension of the array LGRID must be at least NLEV.
On entry: LGRID as supplied to MONITR must be passed unchanged to D03RZF.
8:     ISTRUC* – INTEGER arrayInput
Note: the dimension of the array ISTRUC must be at least LGRIDNLEV+2×nrows+NPTS+1 where nrows is stored in ISTRUCLGRIDNLEV 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:     NPTS – INTEGEROutput
On exit: the number of grid points in the grid level LEVEL.
10:   XLENXY – REAL (KIND=nag_wp) arrayOutput
11:   YLENXY – REAL (KIND=nag_wp) arrayOutput
On exit: Xi and Yi contain the x,y coordinates respectively of the ith grid point, for i=1,2,,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: LENXYNPTS.
13:   IFAIL – INTEGERInput/Output
On entry: IFAIL must be set to 0, -1​ 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​ 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 -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
On entry,LEVEL<1,
orLEVEL>NLEV.
IFAIL=2
The dimension of the arrays X and Y is too small for the requested grid level, i.e., LENXY<NPTS.
IFAIL=-99
An unexpected error has been triggered by this routine. Please contact NAG.
See Section 3.8 in the Essential Introduction for further information.
IFAIL=-399
Your licence key may have expired or may not have been installed correctly.
See Section 3.7 in the Essential Introduction for further information.
IFAIL=-999
Dynamic memory allocation failed.
See Section 3.6 in the Essential Introduction for further information.

7  Accuracy

Not applicable.

8  Parallelism and Performance

Not applicable.

9  Further Comments

None.

10  Example

See Section 10 in D03RBF.

D03RZF (PDF version)
D03 Chapter Contents
D03 Chapter Introduction
NAG Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2015