NAME

cxConnPtrGet - return all contents of a connection list structure

C SPECIFICATION

#include <cx/DataAccess.h>

cxErrorCode cxConnPtrGet(cxConnection *src, long *numElements, long *numConnections, long **elements, long **connections)

FORTRAN SPECIFICATION

integer function cxConnPtrGet(src, numelements, numconnections, pelements, pconnections )
integer src
integer numelements, numconnections
integer pelements, pconnections

pointer (pelements, elements)
pointer (pconnections, connections)
integer elements(numelements)
integer connections(numconnections)

PARAMETERS

src
Input connection list data structure.
numElements
Output length of the elements array.
numConnections
Output length of the connections array.
elements
Output pointer to the array of the cumulative number of connections from all lattice elements at a given pyramid layer.
connections
Output pointer to the array of the concatenated list of all connections (represented by the index number of the connection's destination) for the lattice elements at a given pyramid layer.

FUNCTION RETURN VALUE

The return value for this function is an integer error code.

DESCRIPTION

This function extracts the counts and arrays of the connection list data structure. It returns all the integer sizes and pointers to the arrays of the cxConnection type.

The Fortran user can access the elements and connections 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.

cxConnPtrGet performs essentially the same function as repeated calls to the cxConnEleGet routine, but is many times faster since it avoids data copying and the overhead of multiple subroutine calls.

A return value of cx_err_none indicates success.

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 cxConnPtrGet, because the request is simply ignored when the pointer comes in NULL.

SEE ALSO

cxConnNew(3E), cxConnPtrSet(3E), cxConnEleGet(3E)
Last modified: Mon Nov 18 13:47:27 GMT 1996
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1996