[petsc-users] Question on KSPSetReusePreconditioner

Yuyun Yang yyang85 at stanford.edu
Thu Apr 18 13:46:39 CDT 2019

Let’s say I’m using HYPRE’s boomeramg preconditioner. Could we say anything about convergence/pc construction time if the matrix changes significantly from one solve to the next vs. slightly changes?


From: Matthew Knepley <knepley at gmail.com>
Sent: Thursday, April 18, 2019 9:32 AM
To: Yuyun Yang <yyang85 at stanford.edu>
Cc: petsc-users at mcs.anl.gov
Subject: Re: [petsc-users] Question on KSPSetReusePreconditioner

On Thu, Apr 18, 2019 at 11:44 AM Yuyun Yang via petsc-users <petsc-users at mcs.anl.gov<mailto:petsc-users at mcs.anl.gov>> wrote:
Hello team,

I have a question on when I should be setting KSPSetReusePreconditioner to PETSC_TRUE or PETSC_FALSE. It made a pretty big difference in the solutions I get when I ran my code testing both settings, so is recalculating the preconditioner better since it will make the convergence faster and the solution more accurate? On the other hand, if the operator is updated every time step (but same nonzero pattern), will reconstructing the pc become time-consuming?

We cannot say anything since it (at least) depends on a) how much your matrix changes from one solve to the next, and b)  what preconditioner you are reusing.



Thank you!

What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
-- Norbert Wiener

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20190418/80449ecd/attachment.html>

More information about the petsc-users mailing list