[petsc-users] gmres restart

Matthew Knepley knepley at gmail.com
Mon Nov 29 17:08:50 CST 2010

On Mon, Nov 29, 2010 at 5:04 PM, Verena Kuhlemann <vkuhlem at emory.edu> wrote:

> Hello,
> I have a (hopefully) quick question about setting the restart for gmres.
> I set the restart to be 50, but when I use KSPView it looks like GMRES
> still uses a restart of 30. It is possible that I overwrite my settings
> somehow? Here is the relevant part of my code:
> KSPGMRESSetRestart(ksp,50);

This is ignored because you have not yet set the KSP type.

> KSPSetInitialGuessNonzero(ksp,PETSC_TRUE);
> KSPSetTolerances(ksp,1.e-12,1.e-12,PETSC_DEFAULT,100000);
> KSPSetUp(ksp);

If you move this before the restart call, the type wil be set and it will


> KSPGetPC(ksp,&pc);
> PCSetType(pc,PCNONE);
> KSPSolve(ksp,b,x);
> Thanks,
> Verena

What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20101129/f0993c3f/attachment.htm>

More information about the petsc-users mailing list