[petsc-users] self-defined preconditioner available?

Barry Smith bsmith at mcs.anl.gov
Mon Dec 20 12:52:00 CST 2010


   It is unclear what you mean. Do you mean use the MatMult() for an existing matrix as a preconditioner application for some other matrix? If so then use PCType of PCMAT and call KSPSetOperators() or SNESSetJacobian() with two different matrices the first that defines the linear system and the second that you wish to use directly as the preconditioner.  See the manual page for PCMAT.

  If you mean something else please explain.

   Barry


On Dec 19, 2010, at 10:17 PM, Xiaoyin Ji wrote:

> Hi,
> 
> 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.
> 
> Regards,
> 
> Xiaoyin Ji



More information about the petsc-users mailing list