[petsc-users] mpi_aij MatGetSubMatrix with mat_block_size!=1

Eric Chamberland Eric.Chamberland at giref.ulaval.ca
Mon Nov 30 10:14:51 CST 2015


Hi,

Using PETSc 3.5.3.

We have a "A" matrix, mpi_aij with block_size=3.

We create a IS with ISCreateStride, then extract A_00 with 
MatGetSubMatrix(..., MAT_INITIAL_MATRIX,...).

We know that A_00 is block_size = 3 and mpi_aij, however the matrix 
created by PETSc doesn't have the information...

How can I have the block_size=3 option into the extracted matrix so the 
further PC we configure (gamg) can work with it?

I tried:

MatSetBlockSizes(A_00,3, 3);
after the MatGetSubMatrix, but it doesn't change it...

Thanks,

Eric


More information about the petsc-users mailing list