[petsc-users] KSPBuildSolution
Matthew Knepley
knepley at gmail.com
Wed Feb 16 09:44:25 CST 2011
On Wed, Feb 16, 2011 at 9:18 AM, Juha Jäykkä <juhaj at iki.fi> wrote:
> > SNESSolve uses a Newton method so the linear system is being solving for
> a
>
> So the "solution" in the KSP should actually be identically zero for a
> converged result?
>
It is a correction, and the correction to the exact answer is zero.
> > defect. If the initial guess is zero, then it would normally pick up your
> > Dirichlet boundary conditions on the first iteration and all subsequent
> > solves would have zero in those locations.
>
> It is not zero initially. But, on the other hand, it has zeros at both ends
> even at the very first iteration. If I understood your reply correctly,
> this
> would be expected for an initial guess which has correct values at the
> boundaries and it should only pick them up on the first iteration if they
> were
> not correct to begin with.
>
Yes.
> Having ruled out a possibility of a bug in KSP, I need to continue my hunt
> for
> DIVERGED_LINEAR_SOLVE... None of the convergence tolerances seem to make
> any
> difference, it always diverges. The funny thing is, it diverges even if I
> start with an *exact* *solution*...
>
It is a good idea to use -ksp_type preonly -pc_type lu to start until you
understand the problem.
Matt
> Cheers,
> Juha
>
> --
> -----------------------------------------------
> | Juha Jäykkä, juhaj at iki.fi |
> | http://www.maths.leeds.ac.uk/~juhaj |
> -----------------------------------------------
>
--
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110216/e3cf6c73/attachment.htm>
More information about the petsc-users
mailing list