[petsc-users] PCFIELDSPLIT with MATSBAIJ

Carl-Johan Thore carl-johan.thore at liu.se
Sat Aug 26 09:16:00 CDT 2023


"(Sadly) MATSBAIJ is extremely broken, in particular, it cannot be used to retrieve rectangular blocks in MatCreateSubMatrices, thus you cannot get the A01 and A10 blocks in PCFIELDSPLIT.
I have a branch that fixes this, but I haven’t rebased in a while (and I’m AFK right now), would you want me to rebase and give it a go, or must you stick to a release tarball?"

Ok, would be great if you could look at this! I don't need to stick to any particular branch.

Do you think MATNEST could be an alternative here? My matrix is
[A00 A01;
 A01^t A11]
so perhaps with MATNEST I can make use of the block-symmetry at least, and then use MATSBAIJ for 
A00 and A11 if it's possible to combine matrix types which the manual seems to imply. 

Kind regards
Carl-Johan


> On 26 Aug 2023, at 10:09 PM, Carl-Johan Thore <carljohanthore at gmail.com> wrote:
> 
> Hi,
> 
> I'm trying to use PCFIELDSPLIT with MATSBAIJ in PETSc 3.19.4. 
> According to the manual "[t]he fieldsplit preconditioner cannot 
> currently be used with the MATBAIJ or MATSBAIJ data formats if the 
> blocksize is larger than 1". Since my blocksize is exactly 1 it would seem that I can use PCFIELDSPLIT. But this fails with "PETSC ERROR: For symmetric format, iscol must equal isrow"
> from MatCreateSubMatrix_MPISBAIJ. Tracing backwards one ends up in 
> fieldsplit.c at
> 
> /* extract the A01 and A10 matrices */ ilink = jac->head; 
> PetscCall(ISComplement(ilink->is_col, rstart, rend, &ccis)); if 
> (jac->offdiag_use_amat) { PetscCall(MatCreateSubMatrix(pc->mat, 
> ilink->is, ccis, MAT_INITIAL_MATRIX, &jac->B)); } else {
>         PetscCall(MatCreateSubMatrix(pc->pmat, ilink->is, ccis, 
> MAT_INITIAL_MATRIX, &jac->B)); }
> 
> This, since my A01 and A10 are not square, seems to explain why iscol is not equal to isrow.
> From this I gather that it is in general NOT possible to use 
> PCFIELDSPLIT with MATSBAIJ even with block size 1?
> 
> Kind regards,
> Carl-Johan



More information about the petsc-users mailing list