<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="">Dear Nicolas,<div class="">Here is how I would do it:</div><div class="">- 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" class="">https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/tutorials/ex81.c.html</a></div><div class="">- 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 class=""><br class=""></div><div class="">Thanks,</div><div class="">Pierre<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 17 Apr 2021, at 6:53 PM, Karin&NiKo <<a href="mailto:niko.karin@gmail.com" class="">niko.karin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Dear PETSc users,<br class=""><br class="">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 class="">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 class=""></div><div class=""><br class=""></div><div class="">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 class="">What I would like to do is something like the following but it fails : </div><div class=""><br class=""></div><div class="">-ksp_type fgmres<br class="">-pc_fieldsplit_type multiplicative <br class="">-pc_type fieldsplit    -pc_fieldsplit_0_fields fieldsplit_v_, fieldsplit_p_    -pc_fieldsplit_1_fields fieldsplit_t_ <br class=""></div><div class=""><br class=""></div><div class="">-prefix_push  fieldsplit_0_  <br class="">-ksp_type fgmres<br class="">-pc_fieldsplit_schur_factorization_type upper <br class="">-pc_type fieldsplit <br class="">-pc_fieldsplit_type schur <br class="">-pc_fieldsplit_schur_precondition a11 <br class="">-prefix_pop<br class=""><br class="">-prefix_push  fieldsplit_1_  <br class="">-ksp_type fgmres<br class="">-pc_type jacobi<br class="">-prefix_pop<br class=""></div><div class=""><br class=""></div><div class="">-prefix_push  fieldsplit_v_  <br class="">-ksp_type fgmres<br class="">-pc_type gamg<br class="">-prefix_pop<br class=""><br class="">-prefix_push  fieldsplit_p_  <br class="">-ksp_type fgmres<br class="">-pc_type jacobi<br class="">-prefix_pop<br class=""><br class="">I thank you for your help,</div><div class="">Nicolas<br class=""> <br class=""><br class=""></div></div>
</div></blockquote></div><br class=""></div></body></html>