NAME

cxPyrActiveListNext - list the active elements at the next lower pyramid layer

C SPECIFICATION

#include <cx/Pyramid.h>

long *cxPyrActiveListNext( cxPyramid *pyr, long curLayer, long dstLayer, long count, long *list, long *numActive)

FORTRAN SPECIFICATION

integer function cxPyrActiveListNext( pyr, curLayer, dstLayer, count, list,
numActive )"
integer pyr
integer curLayer
integer dstLayer
integer count
integer list(*)
integer numActive

PARAMETERS

pyr
Input pyramid structure for which computations are to be performed.
curLayer
Input layer of currently active elements (1-based value).
dstLayer
Input layer of next active elements (1-based value).
count
Input number of active elements in list at layer curLayer.
list
Input array of active elements at layer curLayer.
numActive
Output number of active elements in returned array at layer dstLayer.

FUNCTION RETURN VALUE

Returns a pointer to a long array of indices of active elements in layer dstLayer, given that the count elements whose indices are contained in list are active in layer curLayer. Returns a NULL if its input is malformed, if an allocation error occurs, or if the destination layer is in a compressed region. Returns a list of active vertices if dstLayer is zero, even in the presence of compression.

DESCRIPTION

cxPyrActiveListNext accepts a count and a vector of indices identifying the active elements in the pyramid pyr at a given layer, and from this information computes which subordinate elements are active at the lower layer dstLayer. The count of active subordinate elements is the output value of numActive. If dstLayer is greater than curLayer, the routine returns an index vector of all elements that can be reached from the top of the input pyramid.

cxPyrActiveListNext is useful in circumstances where a subset of the elements at a given level are to be manipulated, and the caller wishes to identify the subordinate elements to manipulate at a lower level. This is the approved way of determining the pyramid elements which should be manipulated or displayed in any pyramid-based module (the alternative method of displaying all elements available at a given level is not correct).

The returned index array is considered to be owned by the caller of cxPyrActiveListNext and should be freed (with free(3C)) after use.

Other routines exist to flag as active/inactive elements at a specified layer and to return a variable-length array of the active elements' indices, where curLayer is taken to be the pyramid top.

SEE ALSO

cxPyramid(3E), cxPyrActiveList(3E), cxPyrActiveNext(3E), cxPyrActive(3E).
Last modified: May 27 14:05 1999
[ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999