<div dir="ltr"><div><div>Hi,<br><br></div>Is there anyway I can get the residual at the beginning of the time step? I tried TSSetPreStage and TSSetPreStep but they didn't work. Setting TSSetPreStage would crash the program even if there is nothing in the routine that I set and TSSetPreStep would give me the residual at the end of the previous time step. I want to take a look at the residual at the beginning of the new time step before the nonlinear solver starts.<br>
<br></div>Thanks,<br>Mani<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Mar 15, 2014 at 9:03 PM, Barry Smith <span dir="ltr"><<a href="mailto:bsmith@mcs.anl.gov" target="_blank">bsmith@mcs.anl.gov</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
  Yes but it is slightly complicated. You need to configure PETSc with —with-afterimage   and run the program with -draw_save   then it will save each image.<br>
<br>
  It will open an X window to display each image. You can run with -x_virtual to skip the opening of X windows but then you need Xvfb to be installed<br>
<span class="HOEnZb"><font color="#888888"><br>
   Barry<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
On Mar 15, 2014, at 6:29 PM, Mani Chandra <<a href="mailto:mc0710@gmail.com">mc0710@gmail.com</a>> wrote:<br>
<br>
> -snes_montior_residual is really cool. Anyway I could get it to spit out png images instead of on screen visualization?<br>
><br>
><br>
> On Sat, Mar 15, 2014 at 6:24 PM, Barry Smith <<a href="mailto:bsmith@mcs.anl.gov">bsmith@mcs.anl.gov</a>> wrote:<br>
><br>
><br>
>    You can write a custom monitor and set it with TSMonitorSet()<br>
><br>
>     This routine would call TSGetSNES() then SNESGetSolution() then call SNESComputeFunction() then call VecView() on the result.<br>
><br>
>     But note that just because the residual is big somewhere doesn’t mean the error need be.<br>
><br>
>     You could also run with -snes_monitor_residual to see how the residual is being reduced inside the nonlinear solve (that is, what parts of the residual are most stubborn).<br>
><br>
><br>
>     Barry<br>
><br>
><br>
> On Mar 15, 2014, at 5:47 PM, Mani Chandra <<a href="mailto:mc0710@gmail.com">mc0710@gmail.com</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > Is there anyway I can VecView the residual after TS has completed an implicit time step? I'd like to see where in my domain most of the errors are coming from. I looked at TSMonitor but that doesn't seem to give me access to the residual at the end of the current time step.<br>

> ><br>
> > Thanks,<br>
> > Mani<br>
><br>
><br>
<br>
</div></div></blockquote></div><br></div>