petsc-3.3-p7 2013-05-11

MatIJMap

map an array of global indices (inidxi) 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 replaced by the array of global indices terminating the Mat's pseudograph edges that emanate from i, in the order the edges were provided to MatIJSetEdges() or MatIJSetEdgesIS(); the individual image arrays are concatenated. inidxi ndices outside the local ownership range or the local support are silently ignored -- replaced by empty arrays. The weights from the domain indices are attached to the corresponding images, with duplication, if necessary.

Synopsis

#undef __FUNCT__  
#define __FUNCT__ "MatIJMap"
PetscErrorCode MatIJMap(Mat A, MatIJIndexType intype, PetscInt insize, const PetscInt *inidxi, const PetscInt *inidxj, const PetscScalar *inval, MatIJIndexType outtype, PetscInt *outsize, PetscInt **outidxi, PetscInt **outidxj, PetscScalar **outval, PetscInt **outsizes) 
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
outtype - (MATIJ_LOCAL | MATIJ_GLOBAL) desired meaning of outdxi: local support numbers or global indices

Output Parameters

outsize - size of the output index and weight arrays
outidxi - array (of size outsize) of the global indices adjacent to the indices in inidxi
outidxj - array (of size outsize) of the index weights inherited by outidxi from inidxi
outval - array (of size outsize) of the scalar weights inherited by outidxi from inidxi
imgsizes - array (of size insize) of the sizes of image segments within outidxi for each i from inidxi

See Also

MatIJBin(), MatIJBinMap(), MatIJGetSupport()

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