Two questions regarding SNES/KSP

Matthew Knepley knepley at gmail.com
Wed May 3 16:14:05 CDT 2006


On 5/3/06, Paul T. Bauman <pbauman at ices.utexas.edu> wrote:
>
> Hello,
>
> I'm a new PETSc user, so if the questions I ask are redundant, I
> sincerely apologize. I was, however, unavailable to find the following
> information in the manual pages.
>
> I have two questions.
>
> First: When using the SNES package, is the initial guess for the
> /iterative linear solver/ (e.g. conjugate gradient) 0.0 or is it
> something else (e.g. the current Newton solution)?


If you want that, you need to pull out the KSP from the SNES:


http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/SNES/SNESGetKSP.html

and then flip the flag in the KSP:


http://www-unix.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/KSP/KSPSetInitialGuessNonzero.html

Second: I see that PETSc checks the preconditioner matrix for positive
> definiteness, but does it check whether the current solution iterate is
> positive def. (i.e. if x_i is the current solution iterate and A is the
> current Jacobian matrix, does the algorithm check if (x_i)^T * A * (x_i)
> > 0)?


We cannot check that the preconditioner is positive definite. What we
actually
check it that the A-inner product calculated at each iteration is positive.

   Matt

Thanks so much for your help.
>
> Best Regards,
>
> Paul
>
--
"Failure has a thousand explanations. Success doesn't need one" -- Sir Alec
Guiness
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20060503/95d4d706/attachment.htm>


More information about the petsc-users mailing list