<div dir="ltr">Thank you Pierre and Matt. In fact, I see how to do it programmatically but I would like to give the user the capability to do it from the command-line options juste it can be done with strided splits.<div>@Matt : can you please elaborate a little bit on the solution you proposed please ?<br></div><div><br></div><div>Thanks for your precious help,</div><div>Nicolas</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 17 avr. 2021 à 20:07, Matthew Knepley <<a href="mailto:knepley@gmail.com">knepley@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Sat, Apr 17, 2021 at 1:14 PM Pierre Jolivet <<a href="mailto:pierre@joliv.et" target="_blank">pierre@joliv.et</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Dear Nicolas,<div>Here is how I would do it:</div><div>- if your Pmat type is MATNEST, that’s quite easy, see <a href="https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/tutorials/ex81.c.html" target="_blank">https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/tutorials/ex81.c.html</a></div><div>- otherwise, you’ll need to first define a 2-way field splitting (with v+p and t), then fetch the appropriate (0,0) block with PCFieldSplitGetSubKSP(), and define an inner 2-way field splitting (with v and p).</div></div></blockquote><div><br></div><div>Or you can define a DMShell that gives back these splits for the fields. That is how Firedrake does it.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div>Thanks,</div><div>Pierre<br><div><br><blockquote type="cite"><div>On 17 Apr 2021, at 6:53 PM, Karin&NiKo <<a href="mailto:niko.karin@gmail.com" target="_blank">niko.karin@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Dear PETSc users,<br><br>I use the fieldsplit PC in an application where the splits are programmatically defined by IS using PCFieldSplitSetIS. Then the user can specify its own PC at runtime using PETSc options.<br>My question : is it possible to define nested splits in this case as it can be done with strided splits (see snes/examples/tutorials/ex19.c with test suffix fieldsplit_4).<div></div><div><br></div><div>In order to be perfectly clear : let's say I have a 3 fields problem : velocity (v split), pressure (p split) and temperature (t split).</div><div>What I would like to do is something like the following but it fails : </div><div><br></div><div>-ksp_type fgmres<br>-pc_fieldsplit_type multiplicative <br>-pc_type fieldsplit    -pc_fieldsplit_0_fields fieldsplit_v_, fieldsplit_p_    -pc_fieldsplit_1_fields fieldsplit_t_ <br></div><div><br></div><div>-prefix_push  fieldsplit_0_  <br>-ksp_type fgmres<br>-pc_fieldsplit_schur_factorization_type upper <br>-pc_type fieldsplit <br>-pc_fieldsplit_type schur <br>-pc_fieldsplit_schur_precondition a11 <br>-prefix_pop<br><br>-prefix_push  fieldsplit_1_  <br>-ksp_type fgmres<br>-pc_type jacobi<br>-prefix_pop<br></div><div><br></div><div>-prefix_push  fieldsplit_v_  <br>-ksp_type fgmres<br>-pc_type gamg<br>-prefix_pop<br><br>-prefix_push  fieldsplit_p_  <br>-ksp_type fgmres<br>-pc_type jacobi<br>-prefix_pop<br><br>I thank you for your help,</div><div>Nicolas<br> <br><br></div></div>
</div></blockquote></div><br></div></div></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>
</blockquote></div>