<div dir="ltr"><div>Hello Matt</div><div><br></div>I want to get the first residual norm within my code to decide on convergence.<div><br></div><div>I am solving a steady state problem with pseudo-timestepping and SNES.</div><div><br></div><div>Currently I am calling my FormFunction before call to SNES and using VecNorm.</div><div><br></div><div><div>while(res_norm > res_tol)</div><div>{</div><div>uold = u;</div><div>FormFunction(snes,u,r,&ctx);</div><div>VecNorm(u,NORM_2,&res_norm);</div><div>SNESSolve(snes,NULL,u);</div><div>}<br></div></div><div><br></div><div>But this leads to a duplication of function evaluation.<br></div><div><br></div><div>What I want is something like this</div><div><br></div><div>while(res_norm > res_tol)</div><div>{</div><div>uold = u;</div><div>SNESSolve(snes,NULL,u);</div><div>// get res_norm = first residual of SNES</div><div>}</div><div><br></div><div>Best</div><div>praveen</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 25, 2017 at 6:31 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 dir="ltr">Does -snes_monitor not give that?<div><br></div><div> Thanks,</div><div><br></div><div> Matt</div></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Mon, Sep 25, 2017 at 8:32 AM, Praveen C <span dir="ltr"><<a href="mailto:cpraveen@gmail.com" target="_blank">cpraveen@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">Dear all<div><br></div><div>Is there a way to get the residual in first step of SNES ?</div><div><br></div><div>Thanks</div><span class="m_7290131942701284602HOEnZb"><font color="#888888"><div>praveen</div></font></span></div>
</blockquote></div><br><br clear="all"><div><br></div></div></div><span class="HOEnZb"><font color="#888888">-- <br><div class="m_7290131942701284602gmail_signature" data-smartmail="gmail_signature"><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.caam.rice.edu/~mk51/" target="_blank">https://www.cse.buffalo.edu/~<wbr>knepley/</a><br></div></div></div></div></div>
</font></span></div>
</blockquote></div><br></div>