<div class="gmail_quote">On Wed, Feb 16, 2011 at 17:31, Juha Jäykkä <span dir="ltr">&lt;<a href="mailto:juhaj@iki.fi">juhaj@iki.fi</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div id=":53w">Please let me double-check there has not been a misunderstanding here: the<br>
problems I describe occur with the PETSc built-in FD Jacobian approximation,<br>
not my own. Now, I realise this will be a less-than-optimal approximation, but<br>
I fail to see how there could be a programming mistake, when I am using<br>
SNESDefaultComputeJacobianColor and not my hand-written Jacobian. </div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div id=":53w">
<br>
I do get the same symptoms with the hand-written one, too. That&#39;s why I wanted<br>
to check with the PETSc built in FD version.</div></blockquote></div><br><div>If your system is poorly scaled or genuinely ill-conditioned, the FD Jacobian could be bad. Sometimes it helps to use a more robust method of determining the differencing parameter: -mat_fd_type ds (when using coloring) or -mat_mffd_type ds (when using -snes_mf_operator). You can also try solving the linear system to higher tolerance and looking at the true residual to be sure the linear system really is solved accurately. What sort of problem are you solving?</div>