SAMappingBinSplit

group global indices from the rank's support into n groups or "bins" (some possibly empty) according to which of the n image indices they are mapped to on this rank. The bins and returned as individual SAs. See SAMappingBin() if concatenated bin output is desired. Since SAMapping is potentially multivalued, the same index can appear in multiple bins. The binning is done on the indices of selected type (I or J); the other indices and weights, if any, are moved to the appropriate bin together with the selected indices.

Synopsis

#include "petscsa.h"  
PetscErrorCode SAMappingBinSplit(SAMapping map, SA array, SAIndex index, SA *bins)

Not collective

Input Parameters

map - mapping of indices
array - SA with indices to bin
index - selection of the index to bin on (SA_I or SA_J; PETSC_NULL is equivalent to SA_I)

Output Parameters

bins -SA list of bins; the number of bins is the same as the result of ISGetImageSizeLocal().

See Also

SAMappingGetSupport(), SAMappingGetImage(), SAMappingGetSupportSizeLocal(), SAMappingGetImageSizeLocal(),
SAMappingBin(), SAMappingMapSplit(), SAMappingMapSplitLocal(), SAMappingBinSplitLocal()

Level:advanced
Location:
src/dm/sa/interface/sa.c
Index of all DM routines
Table of Contents for all manual pages
Index of all manual pages