petsc-3.3-p7 2013-05-11

MatIJBin

bin an array of global indices (inidxi) along with index (inidxj) and scalar (inval) weights by pushing the indices along the edges of the underlying pseudograph (see MATIJ). Each locally-owned global index i from inidxi is put in the arrays corresponding to the global indices terminating the Mat's pseudograph edges that emanate from i. The bin arrays are ordered by the terminating index. inidxi ndices outside the local ownership range or the local support are silently ignored -- contribute to no bins. The index weights in inidxj and inval are arranged into bins of their own, exactly mirroring the binning of inidxi.

Synopsis

#undef __FUNCT__  
#define __FUNCT__ "MatIJBin"
PetscErrorCode MatIJBin(Mat A, MatIJIndexType intype, PetscInt insize, const PetscInt *inidxi, const PetscInt *inidxj, const PetscScalar *inval, PetscInt *outsize, PetscInt **outidxi, PetscInt **outidxj, PetscScalar **outval, PetscInt **binsizes) 

Not collective.

Input Parameters

A - pseudograph
intype - (MATIJ_LOCAL | MATIJ_GLOBAL) meaning of inidxi: local support numbers or global indices
insize - size of the input index and weight arrays; PETSC_NULL indicates _all_ support indices
inidxi - array (of size insize) of global indices
inidxj - array (of size insize) of index weights
inval - array (of size insize) of scalar weights

Output Parameters

outsize - size of the array of concatenated bins
outidxi - array (of size outsize) containing the binned indices from inidxi
outidxj - array (of size outsize) containing the binned index weights from inidxj
outval - array (of size outsize) containing the binned scalar weights from inval
binsizes - array (of size n) of bin sizes

Note: n0 is the local image size -- the number of indices terminating the locally-supported indices (see MATIJ) -- and can be obtained with MatIJGetImageSize().

See Also

MatIJMap(), MatIJBinMap(), MatIJGetSupport(), MatIJGetImageSize()

Level:advanced
Location:
src/mat/impls/ij/matij.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages