[petsc-users] Reusing preconditionner values

Jed Brown jedbrown at mcs.anl.gov
Mon Sep 19 06:08:35 CDT 2011


On Mon, Sep 19, 2011 at 12:26, fabien delalondre <delalf at scorec.rpi.edu>wrote:

> To maybe try to speed up my resolution, I would like to not compute the
> values of the preconditionner at every time step, I was wondering if I could
> do the following:
> 1) At a certain point in time, I ll use KSPGetPC<http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/KSP/KSPGetPC.html> to
> get the preconditionner
> 2) I would then use KSPSetPC<http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/KSP/KSPSetPC.html> to
> set the values of the preconditionner, assuming this will prevent the
> calculation of the preconditionner values. Is it a correct assumption or
> should I use a parameter to enforce not re-calculating the precontionner
> values ? Note that I am using a GMRES solver with a block jacobi
> preconditionner (superlu).
>

If you call KSP directly, you should pass SAME_PRECONDITIONER to
KSPSetOperators(). This will use the new matrix, but not recompute the
preconditioner. It will work with any preconditioner.

If you use SNES or TS, you they also have options for lagging the
preconditioner and/or Jacobian.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110919/0dc1baef/attachment.htm>


More information about the petsc-users mailing list