petsc-3.3-p7 2013-05-11

MatGetRedundantMatrix

Create redundant matrices and put them into processors of subcommunicators.

Synopsis

#include "petscmat.h" 
PetscErrorCode  MatGetRedundantMatrix(Mat mat,PetscInt nsubcomm,MPI_Comm subcomm,PetscInt mlocal_red,MatReuse reuse,Mat *matredundant)
Collective on Mat

Input Parameters

mat - the matrix
nsubcomm - the number of subcommunicators (= number of redundant parallel or sequential matrices)
subcomm - MPI communicator split from the communicator where mat resides in
mlocal_red - number of local rows of the redundant matrix
reuse - either MAT_INITIAL_MATRIX or MAT_REUSE_MATRIX

Output Parameter

matredundant -redundant matrix

Notes

MAT_REUSE_MATRIX can only be used when the nonzero structure of the original matrix has not changed from that last call to MatGetRedundantMatrix().

This routine creates the duplicated matrices in subcommunicators; you should NOT create them before calling it.

Only MPIAIJ matrix is supported.

See Also

MatDestroy()

Level:advanced
Location:
src/mat/interface/matrix.c
Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages