On 30/11/15 16:14, Eric Chamberland wrote:
> 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...

The block size of the submatrix comes from the block size that lives
on the IS used to define it.  So set a block size on the IS you make
(ISSetBlockSize).

Cheers,

LAwrence

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to