<br><br><div class="gmail_quote">On Thu, Sep 27, 2012 at 1:22 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, Sep 27, 2012 at 2:13 PM, Zou (Non-US), Ling <span dir="ltr"><<a href="mailto:ling.zou@inl.gov" target="_blank">ling.zou@inl.gov</a>></span> wrote:<br></div><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thank you Matt.<div><br></div><div>I've noticed that there is a different option '-snes_fd', and I guess PETSc will use finite difference method for both Jacobian (action) and Preconditioner?</div></blockquote>
<div><br></div></div><div>-snes_fd uses FD to create the entire dense Jacobian. This is just for testing. -snes_mf uses FD to evaluate the action</div><div>of the Jacobian on a vector.</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>By the way, do you have any comments on my another question?</div><div>====================</div><div><span style="font-family:arial,helvetica,sans-serif">One more question, if I pass '-snes' to PETSc, since it is direct Newton's method, I assume it will explicitly construct a Jacobian. Does this Jacobian come from user provided Jacobian or from the finite difference Jacobian?</span></div>
<div>====================</div></blockquote></div></div></blockquote><div> Ling, </div><div>-snes isn't really a PETSc option. I think Moose recommends using it for "completeness" and in contrast to -snes_mf or -snes_mf_operator, </div>
<div>so that users aren't confused about what's being used to compute the Jacobian when both -snes_mf and -snes_mf_operator are omitted. </div><div>I'll copy this to to moose-users, in case it is useful there.</div>
<div><br></div><div>-snes_mf will implement the action of the Jacobian approximately by differencing the residual. No preconditioner matrix will be used.</div><div>-snes_mf_operator is like -snes_mf, except the user-provided preconditioner matrix will be used.</div>
<div>-snes_fd will *assemble* both the Jacobian and the preconditioner matrix using the same residual-differencing algorithm as in -snes_mf.</div><div><br></div><div>Dmitry.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="gmail_quote"><div class="im"><div><br></div></div><div>The option -snes does not do anything. I am not sure what you are asking here. If you mean,</div><div>what is used when you pass -snes_mf or -snes_mf_operator, it is FD, not the user provided</div>
<div>Jacobian routine if it exists.</div><div><br></div><div> Matt</div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Best,</div>
<div><br></div><div>
Ling<br><br><div class="gmail_quote">On Thu, Sep 27, 2012 at 12:09 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>On Thu, Sep 27, 2012 at 2:01 PM, Zou (Non-US), Ling <span dir="ltr"><<a href="mailto:ling.zou@inl.gov" target="_blank">ling.zou@inl.gov</a>></span> wrote:<br>
</div><div class="gmail_quote"><div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font face="arial, helvetica, sans-serif">Dear all,</font><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">I have a question on the PETSc option '-snes_mf_operator'.</font></div>
<div><font face="arial, helvetica, sans-serif">I am reading the <PETSc Users Manual Revision 3.3>. On page 100, 2nd paragraph, it says:</font></div><div><font face="arial, helvetica, sans-serif"><br></font></div>
<div><font face="arial, helvetica, sans-serif">==============================================================================</font></div><div><font face="arial, helvetica, sans-serif">"However, it
allows us to check the analytic Jacobian we construct in FormJacobian() by passing the -snes_mf_operator flag. This causes PETSc to approximate the Jacobian using finite differencing of the function
evaluation (discussed in section <span style="color:rgb(255,0,0)">5.6), </span>and the analytic Jacobian becomes merely the preconditioner."</font></div><div><font face="arial, helvetica, sans-serif">==============================================================================</font></div>
<p><font face="arial, helvetica, sans-serif">I wonder, if the '-snes_mf_operator' option is used, the Jacobian will always be calculated from the finite difference method while ignore whatever has been provided from user.</font></p>
</blockquote></div><div>Yes, yhe action will be FD, but it will take the user provided operator to form a preconditioner from.</div><div><br></div><div> Matt</div><div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p><font face="arial, helvetica, sans-serif">One more question, if I pass '-snes' to PETSc, since it is direct Newton's method, I assume it will explicitly construct a Jacobian. Does this Jacobian come from user provided Jacobian or from the finite difference Jacobian?</font></p>
<p><br></p><p><font face="arial, helvetica, sans-serif">Thanks,</font></p><p><font face="arial, helvetica, sans-serif"><br></font></p><p><font face="arial, helvetica, sans-serif">Ling</font></p><div><br></div>
</blockquote></div></div><span><font color="#888888"><br><br clear="all"><span><font color="#888888"><div><br></div>-- <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>
</font></span></font></span></blockquote></div><br></div>
</blockquote></div></div><div class="HOEnZb"><div class="h5"><br><br clear="all"><div><br></div>-- <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>
</div></div></blockquote></div><br>