On Wed, Feb 16, 2011 at 1:39 PM, Juha Jäykkä <span dir="ltr"><<a href="mailto:juhaj@iki.fi">juhaj@iki.fi</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">> > 1) it is converging to a local minimum that is not a solution. This is<br>
> > checked by PETSc automatically if the line search failed so is unlikely<br>
> > to be the problem. But run with -info and it will print a great deal of<br>
> > information about the nonlinear solver including a message about " near<br>
> > zero implies" cut and paste all the message about the "near zero" and<br>
> > send it to us.<br>
<br>
</div>There is just one and it is the last message before the usual -snes_monitor<br>
output:<br>
<br>
[0] SNESLSCheckLocalMin_Private(): (F^T J random)/(|| F ||*||random|| 20.4682<br>
near zero implies found a local minimum<br>
<br>
This is with SNES...JacobianColor(). With my own Jacobian, there are none.<br>
<div class="im"><br>
> > 2) the function is not smooth so Newton's taylor series approximation<br>
> > simply doesn't work.<br>
<br>
</div>Which function, F(u) or my u*, which satisfies F(u*)=0? I.e. the unknown or<br>
the function evaluated by FormFunction?<br>
<br>
I find it unlikely that the solution would not be at least twice<br>
differentiable (apart from the endpoints, where it is not): it is almost<br>
guaranteed to be since the equation is the Euler-Lagrange equation of a well<br>
behaved action integral.<br>
<br>
As for F(u), the function is a polynomial of u and x (x being the coordinate),<br>
so it is smooth, if u is.<br>
<div class="im"><br>
> Unlikely possibility #3:<br>
><br>
> You have written an equation with no real solutions, meaning there is a<br>
> mistake in your function.<br>
<br>
</div>But my initial guess is an exact solution. I have two free parameters in the<br>
equation and for a single choice I can find an exact solution - it happens to<br>
be u(x) = x, so the discrete derivatives are exactly the same as the<br>
continuous ones (apart from floating point rounding errors, of course).<br></blockquote><div><br></div><div>Wait, if your initial guess is an exact solution, there should be no KSP solve.</div><div><br></div><div> Matt</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Now, it is quite possible that my problem is poorly scaled or ill-conditioned,<br>
like Jed Brown suggested. Can I check the eigenvalues of the KSP matrices<br>
somehow?<br>
<font color="#888888"><br>
-Juha<br>
</font><div><div></div><div class="h5"><br>
--<br>
-----------------------------------------------<br>
| Juha Jäykkä, <a href="mailto:juhaj@iki.fi">juhaj@iki.fi</a> |<br>
| <a href="http://www.maths.leeds.ac.uk/~juhaj" target="_blank">http://www.maths.leeds.ac.uk/~juhaj</a> |<br>
-----------------------------------------------<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>
-- Norbert Wiener<br>