[petsc-dev] Possible to set max iterations in code?

Jed Brown jedbrown at mcs.anl.gov
Mon Dec 5 01:45:33 CST 2011

On Sun, Dec 4, 2011 at 23:37, Dave Nystrom <Dave.Nystrom at tachyonlogic.com>wrote:

> I've been trolling through the Petsc documentation trying to figure out how
> to set the maximum number of iterations for a krylov solver without using
> the
> command line option -ksp_max_its and without calling KSPSetFromOptions.  Is
> this possible?  If so, how?

When you run with -help, it prints what function to look at for every

  -ksp_max_it <10000>: Maximum number of iterations (KSPSetTolerances)

Did you try reading the documentation for KSPSetTolerances?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111204/f62cd98b/attachment.html>

More information about the petsc-dev mailing list