[petsc-users] get sub matrix from MPIBAIJ with MatCreateSubMatrix

Xiangdong epscodes at gmail.com
Thu Jul 26 10:34:17 CDT 2018


Hello everyone,

I have a question about get the sub matrix Aodd from a MPIBAIJ matrix A.
For example, if the bs=2 and the matrix size is 10x10. How can I get the
5x5 submatrix corresponding to the odd rows and odd columns only?

I tried to use the MatCreateSubMatrix, but get the error messages "Index
set does not match blocks". It seems that MatCreateSubMatrix can only
provide the whole block, instead of just a specific component of that block.

Can you give me some suggestions on extracting the submatrix corresponding
to a specific component?

Thank you.

Best,
Xiangdong
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20180726/6d2479d1/attachment.html>


More information about the petsc-users mailing list