[petsc-users] confusion on the use of fieldsplit

Matthew Knepley knepley at gmail.com
Fri Sep 6 11:16:13 CDT 2013


On Fri, Sep 6, 2013 at 10:48 AM, Umut Tabak <u.tabak at tudelft.nl> wrote:

> Dear all,
>
> I am trying to use PETSc to solve linear systems where the operator
> matrices are composed of blocks. But I am having hard time to set up the
> PCFieldSplit, and a bit lost in the documentation. I sucessfully created
> the matrix represented as
>
> A
> =
> A11 A12
> A21 A22
>
> with
>
> MatCreateNest(PETSC_COMM_**WORLD,nr,NULL,nc,NULL,sub_**matrices,&blockA);
>

1) Forget about MatNest. It is completely orthogonal to FieldSplit. Its
just an optimization.


> but I could not understand really the following steps on how to associate
> a KSP object with Field split properties to use different conditioners on
> different blocks? In the mean time, continue on reading. If you can outline
> the basic steps on how to construct this scheme and submit analysis with
> basic command line options, that would of great help.
>

2) If you have the ISes to make a MatNest, just use them to make the FS:


http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/PC/PCFieldSplitSetIS.html

so you have

  PCFieldSplitSetIS(pc, "1", is1);
  PCFieldSplitSetIS(pc, "2", is2);

Now you can use all the fieldsplit options. There are many examples in
PETSc, see

  src/snes/examples/tutorials/makefile

and ex19 for instance.

   Matt


> By the way, is not possible to output blockA that is assembled above on
> the standard output?
>
> Best regards,
> Umut
>



-- 
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/20130906/34f57890/attachment-0001.html>


More information about the petsc-users mailing list