On Wed, Jun 22, 2011 at 6:52 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;">
Hi all!<br>
<br>
I am having nasty problems with SNES. As you probably guess already, my result<br>
is non-converging line search. I have a good candidate reason for this, but I<br>
do not know how to fix it.<br>
<br>
Jacobian should be fine: -snes_ls_type test gives nice small numbers (not<br>
quite as small as I would like: around 1e-7).<br>
<br>
And even if Jacobian was wrong, -snes_fd behaves in exactly the same way.<br>
<br>
When snes gives up with its line search, the values in the residual vector<br>
are:<br>
<br>
0.00000000e+00, 1.02404374e+00, 2.28558501e-01,<br>
1.94195641e-02, -4.82401091e-02, -7.07456591e-02,<br>
-7.64790651e-02, -7.55281623e-02, -7.19176452e-02<br>
<br>
before they stabilise to interval (1.e-5, 8e-2). Now, my candidate is the huge<br>
(compared to others) value of the rhs at the second lattice point and slightly<br>
smaller, but still large at the third. The diverged solution vector grows very<br>
fast in the beginning and then settles to an almost constant value after about<br>
one tenth of the lattice, so my guess is that the big change needed at i=1<br>
causes precision to be lost at i>>1 and therefore line search fails.<br>
<br>
Do you have any ideas how to get around this or if my theory is even correct?<br></blockquote><div><br></div><div>Its hard to say anything without knowing what equations are being solved. However,</div><div>does the linear problem converge? If so, you could try continuation in a parameter</div>
<div>in the nonlinear term.</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;">
Trying trust region search does not really help: it suffers from the same<br>
deficiency - except that it thinks it converges even though the function norm<br>
is of the order of 0.5. (It does fare slightly better, though, its rhs starts<br>
like<br>
<br>
0.00000000e+00, 3.93745063e-01, 1.79187741e-01,<br>
1.03100385e-01, 6.76686117e-02, 4.82967347e-02,<br>
3.65243377e-02, 2.88059666e-02, 2.34452314e-02,<br>
<br>
which is better, but still not good enough.)<br>
<br>
Cheers,<br>
Juha<br>
<font color="#888888"><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>
</font></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>