NAME

cxLatPtrGet - extract pointers to lattice data and coordinate

C SPECIFICATION

#include <cx/DataAccess.h>

cxErrorCode cxLatPtrGet(cxLattice *src, cxData **data, void **dataVals, cxCoord **coord, void **coordVals)

FORTRAN SPECIFICATION

integer function cxLatPtrGet(src, datahand, pdataval, coordhand, pcoordval)
integer src
integer datahand, pdataval
integer coordhand, pcoordval

pointer (pdataval, dataVals) pointer (pcoordval, coordVals) <type> dataVals(1) real coordVals(1)

PARAMETERS

src
Input lattice from which description is extracted.
data
Set to cxData pointer of src.
dataVal
Set to point to first element in src's data array.
coord
Set to cxCoord pointer of src.
coordVal
Set to point to first element in src's coordinates array.

FUNCTION RETURN VALUE

Returns an integer error code enumeration.

DESCRIPTION

cxLatPtrGet extracts pointers to the cxData and cxCoord structures within a lattice. Pointers to the first elements of the data and coordinate arrays are also extracted. If any of data, dataVals, coord, or coordVals is NULL, that value is not extracted.

If src is not valid, cxLatPtrGet returns cx_err_error, otherwise it returns cx_err_none.

The Fortran user can access the dataVals and coordVals arrays 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 cxLatPtrGet, because the request is simply ignored when the pointer comes in NULL.

SEE ALSO

cxLatDescGet(3E), cxLatNew(3E), cxLatRootNew(3E), cxLatCoordNew(3E),
Last modified: Mon Nov 18 13:50:23 GMT 1996
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996