[petsc-users] self-defined preconditioner available?

Hong Zhang hzhang at mcs.anl.gov
Mon Dec 20 09:12:09 CST 2010


Xiaoyin:
>
> I was wondering if petsc could convert an existing matrix into a preconditioner and use it in ksp solvers...thought this shall be a straight-forward question but I didn't find the answer in manuals. Thanks a lot.

Yes, you can.
See "Shell Preconditioners" in petsc user manual.
Also, check out
~petsc/src/ksp/ksp/examples/tutorials/ex15.c as an example.

Hong


More information about the petsc-users mailing list