<div dir="ltr"><div dir="ltr">On Mon, Apr 1, 2019 at 10:22 AM 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">Dear PETSc developers:<div>Hi,</div><div><p style="margin:0px;white-space:pre-wrap">I've been using -snes_mf_operator and I've customized a precondition matrix to solve my problem.I have two questions about the residuals of linear steps(KSP residual).</p><p style="margin:0px;white-space:pre-wrap"><br></p><p style="margin:0px;white-space:pre-wrap">1.Since I'm using a matrix-free method, how do we get KSP residuals in PETSc? </p><p style="margin:0px;white-space:pre-wrap"> r_m = b - A*x_m</p><p style="margin:0px;white-space:pre-wrap"> Is finite difference used to approximate "A*x_m" ?</p></div></div></blockquote><div><br></div><div>Yes.</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><p style="margin:0px;white-space:pre-wrap">2.What is the difference between instruction ' -ksp_monitor ' and ' -ksp_monitor_true_residual ' in how they are calculated? </p></div></div></blockquote><div><br></div><div>The true residual is the unpreconditioned residual.</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><p style="margin:0px;white-space:pre-wrap">Thanks,</p><p style="margin:0px;white-space:pre-wrap">Yingjie</p><p style="margin:0px;white-space:pre-wrap"><br></p><p class="MsoNormal" style="margin:0cm 0cm 0.0001pt;text-align:justify;font-size:10.5pt;font-family:等线"><span lang="EN-US"></span></p><p style="margin:0px;white-space:pre-wrap"> <br></p></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>