<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="">We have this functionality in a branch, which I'm working on cleaning up to get to master. It doesn't use PETScSection. Sorry about the delay!<br class=""><div><br class=""></div><div>You can only use PCFieldSplitSetDetectSaddlePoint when your diagonal entries being zero or non-zero defines the splits correctly. </div><div><br class=""><blockquote type="cite" class=""><div class="">Am 17.04.2021 um 21:09 schrieb Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><meta charset="UTF-8" class=""><div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; 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;" class=""><div dir="ltr" class="">On Fri, Apr 16, 2021 at 8:39 PM Jorti, Zakariae via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov" class="">petsc-users@mcs.anl.gov</a>> wrote:<br class=""></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr" class=""><div id="gmail-m_7270498382696629604divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class=""><p class="">Hello,</p><p class=""><br class=""></p><p class="">I have a DMStag grid with one dof on each edge and face center. </p><p 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. </p><p 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></p><p 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></p><p class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">If not, how should I do? </span></p><p 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" target="_blank" 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></p><p class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">const PetscInt Bfields[1] = {0},Efields[1] = {1};</span></p><p class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">KSPGetPC(ksp,&pc);</span></p><p class=""><span style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class="">PCFieldSplitSetBlockSize(pc,2);</span></p><p 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></p><p 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></p></div></div></blockquote><div class="">That will not work.That interface only works for colocated fields that you get from DMDA.<br class=""></div><div class=""><br class=""></div><div class="">Patrick, does DMSTAG use PetscSection? Then the field split would be automatically calculated. If not, does it maintain the</div><div class="">field division so that it could be given to PCFIELDSPLIT as ISes?</div><div class=""><br class=""></div><div class="">  Thanks,</div><div class=""><br class=""></div><div class="">     Matt</div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-style: solid; border-left-color: rgb(204, 204, 204); padding-left: 1ex;"><div dir="ltr" class=""><div id="gmail-m_7270498382696629604divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: Calibri, Helvetica, sans-serif;" class=""><p class="">One last thing, I do not know which field comes first. Is it the one defined for face dofs or edge dofs.</p><p class=""><br class=""></p><p class="">Thank you.</p><p class="">Best regards,</p><p class=""><br class=""></p><p class="">Zakariae</p><div class=""><br class="webkit-block-placeholder"></div></div></div></blockquote></div><br clear="all" class=""><div class=""><br class=""></div>--<span class="Apple-converted-space"> </span><br class=""><div dir="ltr" class="gmail_signature"><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class=""><div dir="ltr" class=""><div class="">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br class="">-- Norbert Wiener</div><div class=""><br class=""></div><div class=""><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a></div></div></div></div></div></div></div></div></div></blockquote></div><br class=""></body></html>