[petsc-users] Problem setting Fieldsplit fields

Nicolas Barnafi nbarnafi at cmm.uchile.cl
Fri Feb 3 13:45:58 CST 2023


Dear community,

I am using a fieldsplit preconditioner, but for some reason I cannot 
group fields as in other libraries (i.e. I do this in Firedrake and it 
works). Some context:

I have set four fields to the preconditioner, which I want to regroup with
-pc_fieldsplit_0_fields value: 0,1
-pc_fieldsplit_1_fields value: 2,3

But apparently this doesn't get read for some reason. In fact, from 
-ksp_view I still see all 4 fields, and it fails as one of the blocks 
has a null diagonal (coming from a saddle point problem), so it gives 
the following error. Interestingly, it shows that the groupings where 
not considered:

[0]PETSC ERROR: Object is in wrong state
[0]PETSC ERROR: Matrix is missing diagonal entry 0
[0]PETSC ERROR: WARNING! There are option(s) set that were not used! 
Could be the program crashed before they were used or a spelling 
mistake, etc!
[0]PETSC ERROR: Option left: name:-pc_fieldsplit_0_fields value: 0,1
[0]PETSC ERROR: Option left: name:-pc_fieldsplit_1_fields value: 2,3

Any clues to why this can happen? Best regards,
Nicolás Barnafi



More information about the petsc-users mailing list