<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
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.
<div class=""><br class="">
</div>
<div class="">I can see it should work but it would be good if there will be an easier solution. </div>
<div class=""><br class="">
</div>
<div class="">@Zakariae, I believe dofs get mixed together in dmstag</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Qi</div>
<div class="">--
<div class="">
<div class="">
<div>Qi Tang</div>
<div>T5@LANL</div>
<div class=""><br class="">
</div>
<br class="Apple-interchange-newline">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Apr 16, 2021, at 6:39 PM, Jorti, Zakariae via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; font-family: Calibri, Helvetica, sans-serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Hello,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">I have a DMStag grid with one dof on each edge and face center. </div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">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. </div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">In the DMStag examples (ex2.c and ex3.c), the function PCFieldSplitSetDetectSaddlePoint is used to <font size="3" class="">determine those </font><font size="3" class="">fields based on zero diagonal
entries. In my case, I have a Jacobian matrix that does not have </font>zero<font size="3" class=""> diagonal entries. </font></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><font size="3" class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">Can I use that </span></font><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">PCFieldSplitSetDetectSaddlePoint
in this case? </span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">If not, how should I do? </span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">Should</span><font size="3" class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class=""> I
do like this example (</span></font><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class=""><a href="https://www.mcs.anl.gov/petsc/petsc-master/src/ksp/ksp/tutorials/ex43.c.html" class="">https://www.mcs.anl.gov/petsc/petsc-master/src/ksp/ksp/tutorials/ex43.c.html</a>)</span><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">: </span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">const PetscInt Bfields[1] = {0},Efields[1] = {1};</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">KSPGetPC(ksp,&pc);</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">PCFieldSplitSetBlockSize(pc,2);</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">PCFieldSplitSetFields(pc,"B",1,Bfields,Bfields); PCFieldSplitSetFields(pc,"E",1,Efields,Efields); </span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">where my B unknowns are defined on face centers and E unknowns are defined on edge centers?</span></div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">One last thing, I do not know which field comes first. Is it the one defined for face dofs or edge dofs.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Thank you.</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Best regards,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Zakariae</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</body>
</html>