[petsc-users] ksp/pc nonzero initial guess
Verena Kuhlemann
vkuhlem at emory.edu
Fri Jul 9 07:55:28 CDT 2010
Hello,
I am trying to solve a linear system with GMRES and a preconditioner.
I need a nonzero initial guess and tried to do so by using
KSPSetInitialGuessNonzero(ksp,PETSC_TRUE);
and PCSetInitialGuessNonzero(pc,PETSC_TRUE);
Without a preconditioner (setting: PCSetType(pc,PCNONE)) it works and
my nonzero initial guess is used. But if I try to use a preconditioner
the solver always zeroes out the initial guess.
I would greatly appreciate any help.
Thanks,
Verena
Here is the relevant part of my code:
KSPCreate(PETSC_COMM_WORLD,&ksp);
KSPSetInitialGuessNonzero(ksp,PETSC_TRUE);
KSPSetOperators(ksp,A,A,DIFFERENT_NONZERO_PATTERN);
KSPGetPC(ksp,&pc);
PCSetInitialGuessNonzero(pc,PETSC_TRUE);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20100709/039f6675/attachment.htm>
More information about the petsc-users
mailing list