4.9.3. Grid Geometry
[4.9. Grids]

The next three functions are used to specify the grid geometry. For Cartesian grids, the grid geometry is the locations of cell boundaries for each row, column, and layer. The first row, column, and layer boundary is always assumed to be the grid origin. When using the functions below to set the grid geometry, NumVals is equal to the number of cells in the corresponding direction.

For Curvilinear grids, each coordinate of the grid must be specified for each corner of every cell in the grid. For a 2D curvilinear grid NumVals is equal to (NumI + 1) * (NumJ + 1) for both xfSetGridCoordsI and xfSetGridCoordsJ. For a 3D curvilinear grid NumVals is equal to (NumI + 1) * (NumJ + 1) * (NumK + 1) for all of the functions below. The arrays are numbered in I, J, K order.

C/C++
int xfSetGridCoordsI(xid GroupId, int NumVals, double *iValues);
int xfSetGridCoordsJ(xid GroupId, int NumVals, double *jValues);
int xfSetGridCoordsK(xid GroupId, int NumVals, double *kValues);
FORTRAN
SUBROUTINE  XF_SET_GRID_COORDS_I(GroupId, NumVals, iValues, Error)
INTEGER(XID), INTENT(IN) :: GroupId
INTEGER, INTENT(IN) :: NumVals
REAL(DOUBLE), INTENT(IN) :: iValues
INTEGER, INTENT(OUT)     :: Error
 
SUBROUTINE  XF_SET_GRID_COORDS_J(GroupId, NumVals, jValues, Error)
INTEGER(XID), INTENT(IN) :: GroupId
INTEGER, INTENT(IN) :: NumVals
REAL(DOUBLE), INTENT(IN)  :: jValues
INTEGER, INTENT(OUT)     :: Error
 
SUBROUTINE  XF_SET_GRID_COORDS_K(GroupId, NumVals, kValues, Error)
INTEGER(XID), INTENT(IN) :: GroupId
INTEGER, INTENT(IN) :: NumVals
REAL(DOUBLE), INTENT(IN)  :: kValues
INTEGER, INTENT(OUT)     :: Error
The following functions are used to read the grid coordinate values from the file. The number of values is passed specifying the size allocated for the arrays. If the size is incorrect the library will return a negative value for the error.

C/C++
int xfGetGridCoordsI(xid GroupId, int NumVals, double *iValues);
int xfGetGridCoordsJ(xid GroupId, int NumVals, double *jValues);
int xfGetGridCoordsK(xid GroupId, int NumVals, double *kValues);
FORTRAN
SUBROUTINE  XF_GET_GRID_COORDS_I(GroupId, NumVals, iValues, Error)
INTEGER(XID), INTENT(IN) :: GroupId
INTEGER, INTENT(IN) :: NumVals
REAL(DOUBLE), INTENT(OUT) :: iValues
INTEGER, INTENT(OUT)     :: Error
 
SUBROUTINE  XF_GET_GRID_COORDS_J(GroupId, NumVals, jValues, Error)
INTEGER(XID), INTENT(IN) :: GroupId
INTEGER, INTENT(IN) :: NumVals
REAL(DOUBLE), INTENT(OUT)  :: jValues
INTEGER, INTENT(OUT)     :: Error
 
SUBROUTINE  XF_GET_GRID_COORDS_K(GroupId, NumVals, kValues, Error)
INTEGER(XID), INTENT(IN) :: GroupId
INTEGER, INTENT(IN) :: NumVals
REAL(DOUBLE), INTENT(OUT)  :: kValues
INTEGER, INTENT(OUT)     :: Error

Generated on Wed Jun 2 11:55:32 2010 for XMDF by  doxygen 1.5.6