Hi Barry, <br>Thank you very much for the clarification and comment. The p_n. J'. f_n makes perfect sense. <br><br>Yan<br><br><div class="gmail_quote">On Sun, Dec 6, 2009 at 12:54 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im"><br>
On Dec 6, 2009, at 11:43 AM, Barry Smith wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
I think the confusion comes from the fact that the Amijo condition is almost always in the literature for minimization; not for nonlinear equations.<br>
<br>
If we minimize F(x) the condition is F(x + alpha p) <= F(x) + c alpha p' grad F(x) with c near 1. Here ' denotes transpose<br>
<br>
For the PETSc nonlinear solver F(x) = .5 f(x)' f(x). Ok, now just compute grad F in this case and the Jacobian pops right out. grad F(x) = J f<br>
</blockquote>
<br></div>
Correction; it is actually grad F(x) = J'f hence in the code it computes f' (J p) so it does not need to apply J'<br><font color="#888888">
<br>
Barry</font><div><div></div><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hmm, looks like the comment is wrong where it says f_n . J . f_n, it should say p_n. J. f_n<br>
<br>
Barry<br>
<br>
<br>
On Dec 5, 2009, at 10:24 PM, Ryan Yan wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi All,<br>
I am trying to figure out how the line search is actually working in PETSc and I am looking at this link,<br>
<br>
<a href="http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/SNES/SNESLineSearchGetParams.html" target="_blank">http://www.mcs.anl.gov/petsc/petsc-as/snapshots/petsc-current/docs/manualpages/SNES/SNESLineSearchGetParams.html</a><br>
F(x<br>
Can anyone help to explain why there is a J in the amijo condition?<br>
<br>
alpha - The scalar such that .5*f_{n+1} . f_{n+1} <= .5*f_n . f_n - alpha |f_n . J . f_n|<br>
<br>
<br>
Considering the fact that the newton direction p_n provide a J^{-1} and the gradient of the merit function( 1/2 f . f) provide a J, isn't correct to get rid of J in the definition above?<br>
<br>
Thanks for any suggestions,<br>
<br>
Yan<br>
</blockquote>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br>