[petsc-users] stokes and fieldsplit

Matthew Knepley knepley at gmail.com
Fri Jun 22 15:45:55 CDT 2012


On Fri, Jun 22, 2012 at 12:15 PM, Anton Popov <popov at uni-mainz.de> wrote:

> Hi petsc team,
> I have a question about using nested matrices and vectors for coupled
> solution of Stokes system with filedsplit preconditioner.
>
> Is there a simple example explaining how I can create nested matrix and
> vector using
> "MatCreateNest" and "VecCreateNest" functions, provided that I already
> have all constituting blocks correctly assembled?
> I could not find these example online, and if I do it straightforwardly
> according to documentation, petsc complains that some vector blocks are not
> setup.
>

You do not need MatNest to use FS. Some of us have a crazy MatNest
attachment, so it seems like you do,
but it will work with any matrix.


> Do I need to define velocity and pressure splits using
> "PCFieldSplitSetIS", because if I don't, petsc says "Unhandled case, must
> have at least two fields, not 1!"?
>

If you really have Stokes (a 0 pressure block), use
-pc_fieldsplit_detect_saddle_point.


> Do I need to explicitly specify the blocksize, if I want to use the
> filedsplit preconditioner for the velocity block?
>

No.


> A small example would be extremely helpful
>

SNES ex62 runs it, but you need my FEM assembly configured to do that. I
will post instructions soon.

   Matt


> Thanks a lot,
>
> Anton
>
>


-- 
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/20120622/557c6386/attachment.html>


More information about the petsc-users mailing list