NAME

cxLatDescGet - extract descriptive information about a lattice
#include <cx/DataAccess.h>

cxErrorCode cxLatDescGet(cxLattice *src, long *nDim, long *(dims[]), long *hasData, long *nDataVar, cxPrimType *primType, long *hasCoord, long *nCoordVar, cxCoordType *coordType)
integer function cxLatDescGet(src, nDim, pDims,
  hasData, nDataVar, primType,
  hasCoord, nCoordVar, coordType)
integer src
integer ndim, pDims
integer hasData, nDataVar, primType
integer hasCoord, nCoordVar, coordType

pointer (pDims, dims) integer dims(ndim)
src
Input lattice from which description is extracted.
nDim
Number of dimensions in src.
dims
Array of length per dimension of src.
hasData
True if src has data.
nDataVar
Number of data elements per node in src.
primType
Data type stored in src.
hasCoord
True if src has coordinates.
nCoordVar
Number of elements per coordinate point in src.
coordType
Coordinate representation in src.
Returns an integer error code enumeration. cxLatDescGet extracts information about the shape and type of the lattice src, and places it in the various parameters. If any of nDim, dims, hasData, nDataVar, primType, hasCoord, nCoordVar or coordType is NULL, that value is not extracted. cxLatDescGet allocates an array for dims, it is the programmer's responsibility to free this memory when it is no longer needed. If the array cannot be allocated, cxLatDescGet returns cx_err_error, otherwise it returns cx_err_none.

The data and coordinates of src are not copied.

The Fortran user can access the dims array by using the Fortran Pointer construction to equivalence the returned integer memory address and the start of the desired array, as indicated in the Fortran specification above.

The user can tell the function not to get information on a particular field by passing a NULL pointer value. You need not create dummy variables in the calling routine which calls cxLatDescGet, because the request is simply ignored when the pointer comes in NULL.

cxLatPtrGet(3E), cxLatNew(3E), cxLatRootNew(3E), cxLatCoordNew(3E), cxLatDataNew(3E).
Last modified: Mon Nov 6 16:33:26 GMT 2000
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999