MatGetSubMatrices

Extracts several submatrices from a matrix. If submat points to an array of valid matrices, they may be reused to store the new submatrices.

Synopsis

int MatGetSubMatrices(Mat mat,int n,IS *irow,IS *icol,MatGetSubMatrixCall scall,Mat **submat)
Collective on Mat

Input Parameters

mat - the matrix
n - the number of submatrixes to be extracted
irow, icol - index sets of rows and columns to extract
scall - either MAT_INITIAL_MATRIX or MAT_REUSE_MATRIX

Output Parameter

submat -the array of submatrices

Notes

MatGetSubMatrices() can extract only sequential submatrices(from both sequential and parallel matrices). Use MatGetSubMatrix() to extract a parallel submatrix.

When extracting submatrices from a parallel matrix, each processor canform a different submatrix by setting the rows and columns of itsindividual index sets according to the local submatrix desired.

When finished using the submatrices, the user should destroythem with MatDestroySubMatrices().

Keywords

matrix, get, submatrix, submatrices

See Also

MatDestroyMatrices(), MatGetSubMatrix()

Location: src/mat/interface/matrix.c
Matrix Index
Table of Contents