[petsc-users] Recursive fieldsplit PCs

Matthew Knepley knepley at gmail.com
Mon Dec 2 06:23:31 CST 2013


On Mon, Dec 2, 2013 at 2:26 AM, Lawrence Mitchell <
lawrence.mitchell at imperial.ac.uk> wrote:

> Dear petsc-users,
>
> I have a 3x3 block system built as a single MatNest (with 9 Mats in it).
>  I'd like to treat this as a 2x2 system:
> [ A B
>   C D ]
>
> where A is 2x2 and precondition the A block with a schur complement.
>  Since I have a mat nest, the ISes for the three fields are just
> ISCreateStride(..., mat_i_rows, offset, 1, ...) and these are set on the
> fieldsplit pc.  If I understand the documentation correctly, I think I
> should now be able to do:
>
> -pc_type fieldsplit -fieldsplit_0_fields 0,1 -fieldsplit_1_fields 2
> -fieldsplit_0_pc_type field split -fieldsplit_0_pc_fieldsplit_type schur
>
> ...
>
> However, when doing so, I get an error: "To use Schur complement
> preconditioner you must have exactly 2 fields".  Which suggests to me I
> have failed to inform PETSc that I want the first two fields to be treated
> as 1.
>
> Note that I am not using a DM to build any of these objects.  I build a
> SNES, pull the KSP out of the SNES and then the PC out of the KSP.  I never
> explicitly call SetFromOptions on the PC.  Instead, before the SNES solve I
> call SNESSetFromOptions.  Might this be the problem?
>

This is an unfortunately limitation of the implementation right now. This
option works if you are on a DA with collocation, or if you
use a DM, but not if you just specify the ISes. We should probably write
that code. However, the idea is for people to be moving
to using DM. Could you tell us why DM did not work for you here?

  Thanks,

     Matt


> Cheers,
>
> Lawrence




-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20131202/f859136a/attachment.html>


More information about the petsc-users mailing list