<div dir="ltr"><div>You generally want to use <a href="https://petsc.org/main/docs/manualpages/TS/TSMonitorSet/">https://petsc.org/main/docs/manualpages/TS/TSMonitorSet/</a> for something like this.</div><div>TSSetPostStep is for diagnostics. </div><div>There are differences between the two but I don't recall them.<br></div><div><br></div><div>And you can get the timer derivative with <a href="https://petsc.org/release/docs/manualpages/TS/TS2GetSolution.html">https://petsc.org/release/docs/manualpages/TS/TS2GetSolution.html</a></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 16, 2022 at 11:03 AM Karol Lewandowski <<a href="mailto:Karol.Lewandowski@glasgow.ac.uk">Karol.Lewandowski@glasgow.ac.uk</a>> wrote:<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 style="overflow-wrap: break-word;">
<pre style="white-space:pre-wrap;color:rgb(0,0,0);font-variant-ligatures:normal">Hi, I am developing a program for solving a time-dependent problem using TS solver. At some point, after a successful step, I would like to compute the error indicator which involves time derivatives. I tried to use routines like TSSetPostStep(), however, they do not give me access to vector ts_u_t. </pre>
<pre style="white-space:pre-wrap;color:rgb(0,0,0);font-variant-ligatures:normal">Is there a way to compute the post-step time derivative without copying the vectors (like ts_u_t, ts_u_tt) at each step? </pre>
<pre style="white-space:pre-wrap;color:rgb(0,0,0);font-variant-ligatures:normal"><br></pre>
<pre style="white-space:pre-wrap;color:rgb(0,0,0);font-variant-ligatures:normal">Kind regards,</pre>
<pre style="white-space:pre-wrap;color:rgb(0,0,0);font-variant-ligatures:normal"><br></pre>
<pre style="white-space:pre-wrap;color:rgb(0,0,0);font-variant-ligatures:normal">Karol</pre>
<div><br>
</div>
</div>

</blockquote></div>