[petsc-users] Help with fieldsplit performance

Matthew Knepley knepley at gmail.com
Fri Feb 17 05:35:34 CST 2023


On Tue, Feb 14, 2023 at 1:43 PM Edoardo alinovi <edoardo.alinovi at gmail.com>
wrote:

> Hi Matt,
>
> So I have done some research these days and I have found out that I might
> try to assemble the SIMPLE for Schur approximation (myS = A11 - A10
> inv(DIAGFORM(A00)) A01).
>

I show this on some slides. You can do it with options since the inverse
diagonal is just Preonly/Jacobi. It is not a great preconditioner, at least
for Stokes.


> Reading papers around, I come up with a doubt, which I believe to be a
> very silly one but worth asking...
>
> Is the way the unknowns are packed in the matrix relevant for schur
> preconditioning?
>

No, we pull out the matrices before running the algorithm, so you can use
any numbering you want as long as you
use it when you call SetIS().

  Thanks,

     Matt


> I was studying a bit ex70.c, there the block matrix is defined like:
>
> A = [A00 A10
>        A10  A11]
> Where A00 is the momentum equation matrix, A11 is the pressure equation
> matrix, while A01 and A10 are the matrices for the coupling terms (i.e.
> pressure gradient and continuity). The unknowns are x = [u1..uN v1...vN
> w1...wN p1...pN]^T
>
> In my case, I assemble the matrix cell by cell (FV method), and the result
> will be this one:
>
> [image: image.png]
>
> Then I split the fields giving index 0-1 for u and 2 for p. I guess Petsc
> is already doing the correct handling picking up the *a^33s* to assemble
> A11, but worth being 100% sure :)
>
> Thank you!
>


-- 
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

https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230217/43f9db71/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 28154 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20230217/43f9db71/attachment-0001.png>


More information about the petsc-users mailing list