[petsc-users] DMCreateSubDM() not available in petsc4py

Jed Brown jed at jedbrown.org
Thu Mar 21 16:52:28 CDT 2019


Justin Chang via petsc-users <petsc-users at mcs.anl.gov> writes:

> Hi all,
>
> I'm writing a petsc4py routine to manually create nested fieldsplits using
> index sets, and it looks like whenever I move onto the next level of splits
> I need to rescale the IS's.
>
> From the PCFieldSplitSetDefault() routine, it looks like DMCreateSubDM()
> does exactly this here
> <https://bitbucket.org/petsc/petsc/src/048b3c40cbdab0ededa3294e9c569ef147398dbc/src/ksp/pc/impls/fieldsplit/fieldsplit.c?at=master&fileviewer=file-view-default#fieldsplit.c-433>.
> However, I see no such Python wrapper for this function. While I could
> write my own, I kind of have my hands tied behind my back by using the
> petsc4py that's attached to FEniCS

What do you mean "attached to FEniCS"?

> - I wonder if there's a general strategy or workaround for writing
> your own recursive fieldsplitsetIS.
>
> Thanks,
> Justin


More information about the petsc-users mailing list