petsc-3.14.6 2021-03-30
Report Typos and Errors

MatGetMultiProcBlock

Create multiple [bjacobi] 'parallel submatrices' from a given 'mat' object. Each submatrix can span multiple procs.

Synopsis

#include "petscmat.h" 
PetscErrorCode   MatGetMultiProcBlock(Mat mat, MPI_Comm subComm, MatReuse scall,Mat *subMat)
Collective on Mat

Input Parameters

mat - the matrix
subcomm - the subcommunicator obtained by com_split(comm)
scall - either MAT_INITIAL_MATRIX or MAT_REUSE_MATRIX

Output Parameter

subMat - 'parallel submatrices each spans a given subcomm

Notes

The submatrix partition across processors is dictated by 'subComm' a communicator obtained by com_split(comm). The comm_split is not restriced to be grouped with consecutive original ranks.

Due the comm_split() usage, the parallel layout of the submatrices map directly to the layout of the original matrix [wrt the local row,col partitioning]. So the original 'DiagonalMat' naturally maps into the 'DiagonalMat' of the subMat, hence it is used directly from the subMat. However the offDiagMat looses some columns - and this is reconstructed with MatSetValues()

See Also

MatCreateSubMatrices()

Level

advanced

Location

src/mat/interface/matrix.c

Implementations

MatGetMultiProcBlock_MPIAIJ in src/mat/impls/aij/mpi/mpb_aij.c
MatGetMultiProcBlock_SeqAIJ in src/mat/impls/aij/seq/aij.c
MatGetMultiProcBlock_MPIBAIJ in src/mat/impls/baij/mpi/mpb_baij.c

Index of all Mat routines
Table of Contents for all manual pages
Index of all manual pages