NAME
cxLatDescGet
- extract descriptive information about a lattice
C SPECIFICATION
#include <cx/DataAccess.h>
cxErrorCode cxLatDescGet(cxLattice *src, long *nDim, long *(dims[]),
long *hasData, long *nDataVar, cxPrimType *primType,
long *hasCoord, long *nCoordVar, cxCoordType *coordType)
FORTRAN SPECIFICATION
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)
PARAMETERS
-
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.
FUNCTION RETURN VALUE
Returns an integer error code enumeration.
DESCRIPTION
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.
SEE ALSO
cxLatPtrGet(3E),
cxLatNew(3E),
cxLatRootNew(3E),
cxLatCoordNew(3E),
cxLatDataNew
Last modified: Mon Nov 18 13:50:18 GMT 1996
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996