[petsc-users] Setting an unknown initial guess

David Schneider dav.schneider at tum.de
Tue Dec 8 07:58:45 CST 2020


Dear all,

I'm using a KSPLSQR solver without preconditioning and configure the 
solver once in the beginning. Afterwards, I solve my system multiple 
times in a time-dependent system and I would like to use an initial 
guess (from the previous solution). Currently, I use 
`KSPSetInitialGuessNonzero` for this purpose, but it may happen that the 
actual guess is zero. If the initial guess is zero, the solver fails to 
converge, at least with the default configuration. Setting 
`KSPSetInitialGuess` with `PETSC_FALSE` (which should also be the 
default) zeros the guess out. Is there a (native) way to preserve the 
initial guess, but still ensure convergence in the KSPsolver in case the 
guess is zero?

Thanks in advance,
David



More information about the petsc-users mailing list