[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two questions regarding SNES/KSP



On 5/3/06, Paul T. Bauman <pbauman@xxxxxxxxxxxxxxx> 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