[petsc-users] KSPBuildSolution
Barry Smith
bsmith at mcs.anl.gov
Wed Feb 16 10:40:50 CST 2011
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.
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 |
> -----------------------------------------------
More information about the petsc-users
mailing list