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 ImplementationI 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 noneGoalTo 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?
preconditioned Uzawa method with Petsc
linear algebra;parallel computing;petsc;preconditioning;krylov method