On Wed, Feb 16, 2011 at 10:04 AM, Juha Jäykkä <span dir="ltr">&lt;<a href="mailto:juhaj@iki.fi">juhaj@iki.fi</a>&gt;</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;">
Since I got two emails before I could reply to one, I am replying to both<br>
simultaneously.<br>
<br>
&gt; It is a good idea to use -ksp_type preonly -pc_type lu to start until you<br>
&gt; understand the problem.<br>
<br>
Matthew: Thanks, but I still get diverging line searches.<br>
<br>
&gt; Your Jacobian may be incorrect, try running with -snes_mf_operator -pc_type<br>
&gt; lu -ksp_monitor. The linear solves should converge in 1 iteration. You can<br>
&gt; also try -mat_mffd_type ds if the residual is ill-conditioned.<br>
<br>
Jed: I am running with a FD Jacobian just to make sure my hand-written one is<br>
not the culprit. Is there any reason to suspect this might be the reason?<br></blockquote><div><br></div><div>Yes, line search failure often occurs for incorrect Jacobians because the solution</div><div>to the Newton system is not a descent direction, which is checked by the line search.</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;">
-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>