NAME

cxConnNew - allocate a connection list structure

C SPECIFICATION

#include <cx/DataAccess.h>

cxConnection *cxConnNew(long numElements, long numConnections)

FORTRAN SPECIFICATION

integer function cxConnNew(numelements, numconnections)
integer numelements
integer numconnections

PARAMETERS

numElements
Number of element values.
numConnections
Number of connection values.

FUNCTION RETURN VALUE

The return value for this function is a pointer to a newly allocated connection list structure, or a NULL if its input is malformed or if an allocation error occurs.

DESCRIPTION

cxConnNew allocates a connection list structure that can be used to relate two lattices within a cxPyramid structure. cxConnNew is useful in creating a new pyramid by providing the connection list structures that relate lattices on adjacent levels of the pyramid.

The arrays in the newly allocated structure are filled with zeros to indicate that no connections have been established yet. The elements array in the connection list holds the cumulative number of connections out of lattice elements at a given pyramid layer. It is allocated to hold connection counts for numElements elements and each element is set to have zero connections. The connections array in the connection list holds the concatenation of all connections (represented by the index number of the connection's destination) for the lattice elements at a given pyramid layer. It is allocated to hold destinations for numConnections connections, but no values are stored since the elements array indicates there are no connections that need to be stored.

The newly allocated connection list is a reference counted, shared memory object. Its reference count is set in cxConnNew and need not be changed before use.

SEE ALSO

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