[petsc-users] Nesting splits based on IS
Matthew Knepley
knepley at gmail.com
Sat Apr 17 13:07:39 CDT 2021
On Sat, Apr 17, 2021 at 1:14 PM Pierre Jolivet <pierre at joliv.et> wrote:
> Dear Nicolas,
> Here is how I would do it:
> - if your Pmat type is MATNEST, that’s quite easy, see
> https://www.mcs.anl.gov/petsc/petsc-current/src/ksp/ksp/tutorials/ex81.c.html
> - 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).
>
Or you can define a DMShell that gives back these splits for the fields.
That is how Firedrake does it.
Thanks,
Matt
> Thanks,
> Pierre
>
> On 17 Apr 2021, at 6:53 PM, Karin&NiKo <niko.karin at gmail.com> wrote:
>
> Dear PETSc users,
>
> 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.
> 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).
>
> 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).
> What I would like to do is something like the following but it fails :
>
> -ksp_type fgmres
> -pc_fieldsplit_type multiplicative
> -pc_type fieldsplit -pc_fieldsplit_0_fields fieldsplit_v_,
> fieldsplit_p_ -pc_fieldsplit_1_fields fieldsplit_t_
>
> -prefix_push fieldsplit_0_
> -ksp_type fgmres
> -pc_fieldsplit_schur_factorization_type upper
> -pc_type fieldsplit
> -pc_fieldsplit_type schur
> -pc_fieldsplit_schur_precondition a11
> -prefix_pop
>
> -prefix_push fieldsplit_1_
> -ksp_type fgmres
> -pc_type jacobi
> -prefix_pop
>
> -prefix_push fieldsplit_v_
> -ksp_type fgmres
> -pc_type gamg
> -prefix_pop
>
> -prefix_push fieldsplit_p_
> -ksp_type fgmres
> -pc_type jacobi
> -prefix_pop
>
> I thank you for your help,
> Nicolas
>
>
>
>
--
What most experimenters take for granted before they begin their
experiments is infinitely more interesting than any results to which their
experiments lead.
-- Norbert Wiener
https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210417/0bd79ac7/attachment.html>
More information about the petsc-users
mailing list