#include "petscmat.h" PetscErrorCode MatGetMultiProcBlock(Mat mat, MPI_Comm subComm, MatReuse scall,Mat *subMat)Collective on Mat
mat | - the matrix | |
subcomm | - the subcommunicator obtained by com_split(comm) | |
scall | - either MAT_INITIAL_MATRIX or MAT_REUSE_MATRIX |
subMat | - 'parallel submatrices each spans a given subcomm |
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()