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)
Input lattice from which description is extracted.
Number of dimensions in src.
Array of length per dimension of src.
True if src has data.
Number of data elements per node in src.
Data type stored in src.
True if src has coordinates.
Number of elements per coordinate point in src.
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