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

Dave Nystrom Dave.Nystrom at tachyonlogic.com
Mon Dec 5 02:10:27 CST 2011


Jed Brown writes:
 > 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
 > option.
 > 
 >   -ksp_max_it <10000>: Maximum number of iterations (KSPSetTolerances)
 > 
 > Did you try reading the documentation for KSPSetTolerances?

No, I was looking for documentation on max interations and had not noticed
that a function was provided after options.  Anyway, thanks for your
response.  I've probably spent an hour trying to answer my question via the
online documentation and the users manual.  Good to know about the function
print that -help provides.

Thanks,

Dave



More information about the petsc-dev mailing list