[petsc-users] MatNest with Shell blocks for multipysics

Matteo Semplice matteo.semplice at uninsubria.it
Thu Jul 1 16:10:32 CDT 2021


Thank you, Matthew and Barry!

I can now see a way forward.

Il 01/07/21 21:42, Barry Smith ha scritto:
>> I do not understand how creating a DMDA with n0+n1 dofs will let me easily reuse my shell preconditioner code on the top-left block.
>     PCFIELDSPLIT (and friends) do not order the dof by block, rather they "pull out" the required pieces of the vector (using IS's) when needed. Your shell preconditioner will just operate on the "pulled out" vectors. If you use DMDAVecGetArray etc in your shell preconditioner you can create an auxiliary DMDA of that smaller dof to still be able to use the DMDAVecGetArray constructs.
Just to be sure:

- I create a DMDA with n0+n1 dof per node

- the jacobian will be associated to this DMDA. (It is not crucial, but 
can this be a shell matrix?)

- I create a multiplicative PCfieldsplit, assign the correct n0 and n1 
fields to each split (and get the IS for the splits via 
PCFieldSplitGetIS, shuld I need them)

- the routine A00PCApply for the shell preconditioner of the A00 block, 
will see a Vec which is really a subvector with n0 dofs per node. In 
order to use DMDA semantics on this one, I create a DMDA with n0 dofs 
using DMDACreateCompatibleDMDA and then VecGetArrayDOFS using the 
smaller DMDA?

Best

     Matteo


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210701/8c561d18/attachment.html>


More information about the petsc-users mailing list