On Jul 1, 2021, at 4:10 PM, Matteo Semplice <matteo.semplice@uninsubria.it> wrote:Thank you, Matthew and Barry!
I can now see a way forward.
Il 01/07/21 21:42, Barry Smith ha scritto:
Just to be sure: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.- 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