[petsc-dev] DMKSP and pcfieldsplit
wence at gmx.li
Wed Mar 6 09:51:17 CST 2019
> On 6 Mar 2019, at 01:39, Smith, Barry F. <bsmith at mcs.anl.gov> wrote:
> Is this issue resolved or still stuck. I totally agree with you that Matt's change seems inane, how can one possibly just take the function/pointer that operates on the whole DM and assume it will work for a subDM?
After some more analysis, it turns out it's fine. The function pointers are generic and DMCreateFieldDecomposition sets the relevant (split) application context on the subdms, so this works.
The problem exists because when we're rediscretising inside a fieldsplit the subdms do not have any concept of the global problem's state vector. Hence they always linearise around zero.
When restricting the full problem to coarse grids, there is a magic DMRestrictHook_SNESVecSol that arranges for the state vector to be injected into the coarse grid. When we do fieldsplit, the subdms lose this connection, and hence they do not provide a useful state.
In the same way that DMRestrictHook and DMCoarsenHook run, I think this means that there needs to be a DMCreateFieldDecompositionHook into which SNES can put an appropriate "copy a chunk of the state vector". Term is nearly finished here, so I will endeavour to get this done once march ends and April begins.
More information about the petsc-dev