[petsc-users] Example for MatInvertBlockDiagonal

Cyrill Vonplanta cyrill.von.planta at usi.ch
Mon Sep 19 14:21:16 CDT 2016


>   block size > 1 really only makes sense if the block size is really greater than one. So if A has blocks of size 3 you should create A as BAIJ and thus never need to call the convert routine.

Unfortunately A is not created by my part of the program and comes with blocksize 1.

>
>   You can also set the block size for AIJ matrix to 3 and use MatInvertBlockDiagonal() on that matrix and not use the BAIJ matrix. 

If I run:
ierr = MatSetBlockSize(A, 3);  CHKERRQ(ierr);

It doesn’t work for me. I get:

[1;31m[0]PETSC ERROR: --------------------- Error Message --------------------------------------------------------------
[0;39m[0;49m[0]PETSC ERROR: Arguments are incompatible
[0]PETSC ERROR: Cannot change block size 1 to 3
[0]PETSC ERROR: See http://www.mcs.anl.gov/petsc/documentation/faq.html for trouble shooting.
[0]PETSC ERROR: Petsc Release Version 3.6.3, Dec, 03, 2015 
.
.

What are the constraints for blocksize? 






More information about the petsc-users mailing list