[petsc-users] KSPBuildSolution

Matthew Knepley knepley at gmail.com
Wed Feb 16 11:42:14 CST 2011


On Wed, Feb 16, 2011 at 10:40 AM, Barry Smith <bsmith at mcs.anl.gov> wrote:

>
>   Try using SNESDefaultComputeJacobian() see if that makes any difference.
>
>   99.9% of the causes of non-convergencing Newton are wrong or slightly
> wrong Jacobians. Very unlikely possibilities are
>
> 1) it is converging to a local minimum that is not a solution. This is
> checked by PETSc automatically if the line search failed so is unlikely to
> be the problem. But run with -info and it will print a great deal of
> information about the nonlinear solver including a message about  " near
> zero implies" cut and paste all the message about the "near zero" and send
> it to us.
>
> 2) the function is not smooth so Newton's taylor series approximation
> simply doesn't work.


Unlikely possibility #3:

  You have written an equation with no real solutions, meaning there is a
mistake in your function.

     Matt


>
>   Barry
>
> On Feb 16, 2011, at 10:31 AM, Juha Jäykkä wrote:
>
> >> Yes, it is the most common place to make programming mistakes and the
> >> symptoms you describe are typical.
> >
> > Please let me double-check there has not been a misunderstanding here:
> the
> > problems I describe occur with the PETSc built-in FD Jacobian
> approximation,
> > not my own. Now, I realise this will be a less-than-optimal
> approximation, but
> > I fail to see how there could be a programming mistake, when I am using
> > SNESDefaultComputeJacobianColor and not my hand-written Jacobian.
> >
> > I do get the same symptoms with the hand-written one, too. That's why I
> wanted
> > to check with the PETSc built in FD version.
> >
> > 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/47c5317e/attachment-0001.htm>


More information about the petsc-users mailing list