[petsc-users] matrix-free preconditionning of FGMRES
Barry Smith
bsmith at mcs.anl.gov
Sun Jan 16 18:35:01 CST 2011
On Jan 16, 2011, at 5:59 PM, Darcoux Christine wrote:
> I am new to PETSc and I am interested to use the nonlinear solver in a CFD code for low speed compressible fluid.
>
> According to some papers, it seems that GMRES (or any other Krylov method) could be used to precondition FGMRES in a way that is completely matrix-free. Is it something possible with the fgmres implementation provided by PETSc ?
Yes, but like anything with "matrix-free" is the question how you provide a decent preconditioner without forming any matrices. If you can do that then you are all set.
KSPSetOperators(ksp,A,B,...) or SNESSetJacobian(snes,A,B, ....) where A is a a MATSHELL that does matrix vector products or use MatCreateMFFD()
-ksp_type fgmres -pc_type ksp -ksp_ksp_type gmres -ksp_view
If B is some approximate representation of A then B will be used to construct the preconditioner, if you never have a matrix-representation but have a function/subroutine that is supposedly a good preconditioner then you would use PCSHELL to provide it. So there are several possibilities depending on what you have and what you want to do.
Barry
> Christine
>
More information about the petsc-users
mailing list