NAG Library Routine Document

d03rzf (dim2_gen_order2_rectilinear_extractgrid)

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

Fortran Interface
Subroutine d03rzf ( level, nlev, xmin, ymin, dxb, dyb, lgrid, istruc, npts, x, y, lenxy, ifail)
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)
C Header Interface
#include <nagmk26.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)

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

4
References

None.

5
Arguments

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 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
On entry, level=value.
Constraint: level1.
On entry, level=value and nlev=value.
Constraint: levelnlev.
ifail=2
On entry, lenxy=value.
Constraint: lenxyvalue.
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

d03rzf is not threaded in any implementation.

9
Further Comments

None.

10
Example

See Section 10 in d03rbf.