# preconditioned Uzawa method with Petsc

I am trying to improve the resolution of a Stokes problem (P2/P1 on unstructured mesh) defined by the matrix $M$:

$M= \begin{pmatrix} A_u & 0 & B_u \\ 0 & A_v & B_v\\ B_u^T & B_v^T & 0 \end{pmatrix}$

# Current Implementation

I am currently solving it using a Uzawa method, with a Krylov method accelerated by a preconditioner. This preconditioner is build by additive composition of the matrices $A_p$ and $A_m$.

I use Petsc to solve each sub-problems, $A_u$, $A_v$, $A_p$ and $A_m$ (in format mpiaij), but I handle the Uzawa method separately.

$A_u$ and $A_v$ are solved using cg, ASM preconditioning and level 2 icc:

-ksp_type cg -pc_type asm -sub_pc_type icc -sub_pc_factor_levels 2


$A_p$ is solved using cg with AMG preconditioning:

-ksp_type cg -pc_type hypre -pc_hypre_type boomeramg


$A_m$ is solved using cg without preconditioning:

-ksp_type cg -pc_type none


# Goal

To improve the speed and allow for easier tuning , I would like to have Petcs do the all the Uzawa process. I am able to pass $M$ in mpiaij format to Petsc. But the tool I use can only pass one, and only one matrix to Petsc, but I could concatenate $M$+$A_p$+$A_m$ and give that to Petsc:

$\begin{pmatrix} M & 0 & 0\\ 0 & A_p & 0\\ 0 & 0 & A_m \end{pmatrix}$

How can I tell Petsc to separate $M$ from $A_p$/$A_m$ and to use $A_p$ and $A_m$ as preconditioner matrices for the Shur complement in a Uzawa method?

• May I suggest that you focus on passing multiple matrices to PETSc instead? It will allow you to use their PCFIELDSPLIT framework as designed to get any of the fieldsplit_type Schur preconditioners and supply your favorite preconditioner for the Schur complement. Otherwise, just pass $M$ and use an out-of-the-box preconditioner such as "pclsc" or "selfp" for the Schur complement. Aug 21 '15 at 9:33
• Thank you for input. I was kind of expecting such an answer. Sadly, modifying the tool I use to be able pass multiple matrices requires skills I don't have. I will none the less try the preconditioner you suggested for the Schur complement when passing only $M$ Aug 21 '15 at 10:59