<div dir="ltr">Thanks for your helpful answers.<div><br></div><div>Here's another question...</div><div><br></div><div>As I read some example PETSc codes, I noticed that there should be a preconditioning matrix (e.g. approx. jacobian matrix) when using MatCreateSNESMF().</div><div><br></div><div>I mean,</div><div>after calling MatCreateSNESMF(snes, A, ier),</div><div>there should be another matrix preA(preconditioning matrix) to use SNESSetJacobian(snes, A, preA, FormJacobian, ctx, ier).</div><div><br></div><div><br></div><div>1) Is there any way that I can use matrix-free method without making preconditioning matrix?</div><div><br></div><div>2) I have a reference code, and the code adopts </div><div><br></div><div>MatFDColoringCreate()</div><div>and finally uses</div><div>SNESComputeJacobianDefaultColor() at FormJacobian stage.</div><div><br></div><div>But I can't see the inside of the fdcolor and I'm curious of this mechanism. Can you explain this very briefly or tell me an example code that I can refer to. ( I think none of PETSc example code is using fdcolor..)</div><div><br></div><div><br></div><div>Best,</div><div><br></div><div>Kyungjun.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-19 0:54 GMT+09:00 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Thu, Aug 18, 2016 at 10:39 AM, 최경준 <span dir="ltr"><<a href="mailto:kyungjun.choi92@gmail.com" target="_blank">kyungjun.choi92@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 dir="ltr">1) I wanna know the difference between applying option with command line and within source code.<br>>From my experience, command line option helps set other default settings that I didn't applied, I guess.</div></blockquote><div><br></div></span><div>The command line arguments are applied to an object when *SetFromOptions() is called, so in this case</div><div>you want SNESSetFromOptions() on the solver. There should be no difference from using the API.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>2) I made a matrix-free matrix with MatCreateSNESMF function, and every time I check my snes context with SNESView, </div><div><br></div><div><div> Mat Object: 1 MPI processes<br></div><div> type: mffd</div><div> rows=11616, cols=11616</div><div> Matrix-free approximation:</div><div> err=1.49012e-08 (relative error in function evaluation)</div><div> The compute h routine has not yet been set</div></div><div><br></div><div>at the end of line shows there's no routine for computing h value.</div><div>I used MatMFFDWPSetComputeNormU function, but it didn't work I think.</div><div>Is it ok if I leave the h value that way? Or should I have to set h computing routine?</div></div></blockquote><div><br></div></span><div>I am guessing you are calling the function on a different object from the one that is viewed here.</div><div>However, there will always be a default function for computing h.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Kyungjun.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-08-18 23:18 GMT+09:00 Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span>On Thu, Aug 18, 2016 at 8:35 AM, 최경준 <span dir="ltr"><<a href="mailto:kyungjun.choi92@gmail.com" target="_blank">kyungjun.choi92@gmail.com</a>></span> wrote:<br><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">Hi, I'm trying to set my SNES matrix-free with Walker & Pernice way of computing h value.<div><br></div><div>I found above command (MatSNESMFWPSetComputeNormU) but my fortran compiler couldn't fine any reference of that command.</div><div><br></div><div>I checked Petsc changes log, but there weren't any mentions about that command.</div><div><br></div><div>Should I have to include another specific header file? </div></div></blockquote><div><br></div></span><div>We have this function</div><div><br></div><div> <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatMFFDWPSetComputeNormU.html" target="_blank">http://www.mcs.anl.gov/petsc<wbr>/petsc-current/docs/manualpage<wbr>s/Mat/MatMFFDWPSetComputeNormU<wbr>.html</a></div><div><br></div><div>but I would recommend using the command line option</div><div><br></div><div> <b style="color:rgb(0,0,0);font-family:Times;font-size:medium">-mat_mffd_compute_normu</b></div><div> </div><div> Thanks,</div><div><br></div><div> Matt</div><div><br></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>Thank you always.</div></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><span><font color="#888888"><div><br></div>-- <br><div data-smartmail="gmail_signature">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>
</font></span></font></span></div></div>
</blockquote></div><br></div>
</blockquote></span></div><span class=""><br><br clear="all"><div><br></div>-- <br><div data-smartmail="gmail_signature">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>
</span></div></div>
</blockquote></div><br></div>