<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">Matt and Patrick</div>
<div class=""><br class="">
</div>
<div class="">If I replace </div>
<div class=""> <a href="https://petsc.org/main/docs/manualpages/PC/PCFieldSplitSetDetectSaddlePoint.html#PCFieldSplitSetDetectSaddlePoint" style="orphans: 2; widows: 2;" class="">PCFieldSplitSetDetectSaddlePoint</a><span style="orphans: 2; widows: 2;" class="">(pc,</span><a href="https://petsc.org/main/docs/manualpages/Sys/PETSC_TRUE.html#PETSC_TRUE" style="orphans: 2; widows: 2;" class="">PETSC_TRUE</a><span style="orphans: 2; widows: 2;" class="">);</span></div>
<div class="">in <a href="https://petsc.org/main/src/dm/impls/stag/tutorials/ex3.c.html" class="">https://petsc.org/main/src/dm/impls/stag/tutorials/ex3.c.html</a></div>
<div class="">with</div>
<div class="">
<div class=""> const PetscInt ufield[] = {0,1,2},pfield[] = {3};</div>
<div class=""> PCFieldSplitSetBlockSize(pc,4);</div>
<div class=""> PCFieldSplitSetFields(pc,"u",3,ufield,ufield);</div>
<div class=""> PCFieldSplitSetFields(pc,"p",1,pfield,pfield); </div>
</div>
<div class="">It does not work. It seems petsc just divide all the dofs by four and assign “components” one by one. I am not sure that is the right thing to do with dmstag.</div>
<div class=""><br class="">
</div>
<div class="">This would divide everything into two components of the same size, which is not correct either.</div>
<div class="">
<div class=""> const PetscInt ufield[] = {0},pfield[] = {1};</div>
<div class=""> PCFieldSplitSetBlockSize(pc,2);</div>
<div class=""> PCFieldSplitSetFields(pc,"u”,1,ufield,ufield);</div>
<div class=""> PCFieldSplitSetFields(pc,"p",1,pfield,pfield); </div>
</div>
<div class=""><br class="">
</div>
<div class="">Is there an alternative solution to this?</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div class="">
<div>Qi</div>
<div class=""><br class="">
</div>
<br class="Apple-interchange-newline">
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Mar 12, 2022, at 5:49 PM, Tang, Qi <<a href="mailto:tangqi@msu.edu" class="">tangqi@msu.edu</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div class="">Thanks a lot, Matt. </div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div dir="ltr" class="">
<div class="gmail_quote">
<div class=""> 1) Are you using DMStag? If so, the field split might be able to be automated.</div>
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
I think this is true only if I have one component on each vertex/face/edge. I have two dofs on vertex, corresponding to component 0 and 1. They are mixed together as I understand. </div>
<div class=""><br class="">
</div>
<div class="">Meanwhile, I am testing the three field version using automated split and two nested fieldsplit (so pc will handle vertex dofs together). I expect it will work. </div>
<div class=""><br class="">
</div>
<div class="">
<blockquote type="cite" class="">
<div dir="ltr" class="">
<div class="gmail_quote">
<div class=""> 2) Checking the division:</div>
</div>
</div>
</blockquote>
<br class="">
</div>
<div class="">I am trying to do </div>
<div class="">
<div dir="ltr" class="">
<div class="gmail_quote">
<div class=""> Schur complement {1, 2, 3} and {0}</div>
<div class=""> Multiplicative {1} and {2, 3}</div>
<div class=""> Schur complement {2} and {3}</div>
<div class=""><br class="">
</div>
<div class="">The first level is a saddle point problem and the last level is parabolization. I know the diagonal operator for {1} and Schur complement for {3} works well with amg.</div>
<div class=""><br class="">
</div>
<div class="">Qi</div>
</div>
</div>
</div>
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On Mar 12, 2022, at 3:21 PM, Matthew Knepley <<a href="mailto:knepley@gmail.com" class="">knepley@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 16px; 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, Mar 11, 2022 at 3:32 PM Tang, Qi <<a href="mailto:tangqi@msu.edu" class="">tangqi@msu.edu</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;">
Hi,<br class="">
I am trying to solve a four field system with three nested fieldsplit (I am in petsc/dmstag directly). I think I have all the IS info in the original system. I am wondering how to set up IS for the split system.<br class="">
</blockquote>
<div class=""><br class="">
</div>
<div class="">Some questions first:</div>
<div class=""><br class="">
</div>
<div class=""> 1) Are you using DMStag? If so, the field split might be able to be automated.</div>
<div class=""><br class="">
</div>
<div class=""> 2) Checking the division:</div>
<div class=""><br class="">
</div>
<div class=""> Schur complement {1, 2, 3} and {0}</div>
<div class=""> Multiplicative {1,2} and {3}</div>
<div class=""> Schur complement {1} and {2}</div>
<div class=""><br class="">
</div>
<div class=""> Thanks,</div>
<div class=""><br class="">
</div>
<div class=""> Matt</div>
<div class=""> </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;">
More specifically, I would like to call something like this<br class="">
-pc_type fieldsplit -pc_fieldsplit_type schur -pc_fieldsplit_0_fields 0 -pc_fieldsplit_1_fields 1,2,3<br class="">
-fieldsplit_1_ksp_type fgmres -fieldsplit_1_pc_type fieldsplit -fieldsplit_1_pc_fieldsplit_type multiplicative<br class="">
-fieldsplit_1_fieldsplit_1_ksp_type fgmres -fieldsplit_1_fieldsplit_1_pc_type fieldsplit -fieldsplit_1_fieldsplit_1_pc_fieldsplit_type schur<br class="">
<br class="">
I know the first level probably would work. But the second and third levels would not.<span class="Apple-converted-space"> </span><br class="">
<br class="">
We have two components living on one type of dofs. So the natural split 0,1,2,3 do not work. Therefore, at the first level I am setting up split through<br class="">
PCFieldSplitSetIS(pc, “i", myis[i]);<br class="">
How could I know the sub ISs and set it up correctly? Thanks.<br class="">
<br class="">
<br class="">
Qi Tang<br class="">
T5@LANL<br class="">
<br class="">
<br class="">
<br class="">
</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="https://urldefense.com/v3/__http://www.cse.buffalo.edu/*knepley/__;fg!!HXCxUKc!mFfBXSXv1xb00aJzISaY9ymPjPF_fX30APRsXjauIJzSwgpBxk1pdgI22I9PEg$" target="_blank" class="">https://www.cse.buffalo.edu/~knepley/</a></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>