Tang, Qi tangqi at msu.edu
Sat Apr 17 14:03:57 CDT 2021

```The only example currently supports the splitting in dmsag is through PCFieldSplitSetDetectSaddlePoint. One approach might be writing a dummy solver, fill one block as diagonal 0, call PCFieldSplitSetDetectSaddlePoint and get its IC, and then use IS in the actual solver.

I can see it should work but it would be good if there will be an easier solution.

@Zakariae, I believe dofs get mixed together in dmstag

Thanks,
Qi
--
Qi Tang
T5 at LANL

On Apr 16, 2021, at 6:39 PM, Jorti, Zakariae via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:

Hello,

I have a DMStag grid with one dof on each edge and face center.
I want to use a PCFieldSplit preconditioner on a Jacobian matrix that I assume is already split but I am not sure how to determine the fields.
In the DMStag examples (ex2.c and ex3.c), the function PCFieldSplitSetDetectSaddlePoint is used to determine those fields based on zero diagonal entries. In my case, I have a Jacobian matrix that does not have zero diagonal entries.
Can I use that PCFieldSplitSetDetectSaddlePoint in this case?
If not, how should I do?
Should I do like this example (https://www.mcs.anl.gov/petsc/petsc-master/src/ksp/ksp/tutorials/ex43.c.html):
const PetscInt Bfields[1] = {0},Efields[1] = {1};
KSPGetPC(ksp,&pc);
PCFieldSplitSetBlockSize(pc,2);
PCFieldSplitSetFields(pc,"B",1,Bfields,Bfields); PCFieldSplitSetFields(pc,"E",1,Efields,Efields);
where my B unknowns are defined on face centers and E unknowns are defined on edge centers?

One last thing, I do not know which field comes first. Is it the one defined for face dofs or edge dofs.

Thank you.
Best regards,

Zakariae

-------------- next part --------------
An HTML attachment was scrubbed...