<div dir="ltr"><div dir="ltr">On Wed, Jan 16, 2019 at 10:59 PM Yingjie Wu via petsc-users <<a href="mailto:petsc-users@mcs.anl.gov">petsc-users@mcs.anl.gov</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Dear PETSc developers: <br></div><div dir="ltr"> Hi, <br></div><div dir="ltr">During the process of testing the program, I found some questions about SNES. These are some basic questions that I have overlooked. Please help me to answer them. <br></div><div dir="ltr"> 1. Because my program uses - snes_mf_operator, there is no Jacobian matrix. Linear and non-linear step residuals are different in petsc. The linear step residuals are r_linear = J*δx-f(x). Since I don't have a Jacobian matrix, I don't know how to calculate the relative residuals of linear steps provided in petsc. Do we use the finite difference approximation matrix vector product when calculating the residuals? </div></div></blockquote><div><br></div><div>PETSc is using a FD approximation to the Jacobian.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">2. Read the user's manual for a brief introduction to the inexact Newton method, but I am very interested in the use of this method. I want to know how to use this method in petsc. <br></div></div></blockquote><div><br></div><div>Inexact Newton is any method that does not solve the Newton system exactly, so essentially any iterative solver. Do you mean quasi-Newton, which is -snes_type qn</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"></div><div dir="ltr">3. The default line search used by SNES in PETSc is bt, which often fails in program debugging. I don't know much about linesearch, and I'm curious to know why it failed. How can I supplement this knowledge? </div></div></blockquote><div><br></div><div>Usually bt only fails if your search direction is not actually correct. Are you sure your Jacobian is right?</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Thanks,</div><div>Yingjie<br></div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>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</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>