[petsc-users] Starting point for Stokes fieldsplit

Dave May dave.mayhem23 at gmail.com
Tue Feb 21 05:36:54 CST 2012


Max,

>
> The test case that I am working with is isoviscous convection, benchmark
> case 1a from Blankenbach 1989.
>

Okay, I know this problem.
An iso viscous problem, solved on a uniform grid using  dx=dy=dz discretised
via FV should be super easy to precondition.

>
>
> I think that this is the problem. The (2,2) slot in the LHS matrix is all
> zero (pressure does not appear in the continuity equation), so I think that
> the preconditioner is meaningless. I am still confused as to why this choice
> of preconditioner was suggested in the tutorial, and what is a better choice
> of preconditioner for this block? Should I be using one of the Schur
> complement methods instead of the additive or multiplicative field split?
>

No, you need to define an appropriate stokes preconditioner
You should assemble this matrix
  B = ( K,B ; B^T, -1/eta* I )
as the preconditioner for stokes.
Here eta* is a measure of the local viscosity within each pressure
control volume.
Unless you specify to use the real diagonal

Pass this into the third argument in KSPSetOperators() (i.e. the Pmat variable)
http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/KSP/KSPSetOperators.html

Not sure how you represent A and B, but if you really want to run just
additive with fieldsplit, you don't need the off diagonal blocks, so
  B = ( K,0 ; 0, -1/eta* I )
would yield the same result. Depending on your matrix representation,
this may save you some memory.

PCFieldsplit will use the B(1,1) and B(2,2) to build the stokes
preconditioner unless you ask for it to use the real diagonal - but
for the stokes operator A, this makes no sense.

This is the right thing to do (as Matt states).
Try it out, and let us know how it goes.


Cheers,
  Dave


More information about the petsc-users mailing list