You generally want to use https://petsc.org/main/docs/manualpages/TS/TSMonitorSet/ for something like this. TSSetPostStep is for diagnostics. There are differences between the two but I don't recall them.
And you can get the timer derivative with https://petsc.org/release/docs/manualpages/TS/TS2GetSolution.html On Mon, May 16, 2022 at 11:03 AM Karol Lewandowski < [email protected]> wrote: > 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. > > 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? > > > Kind regards, > > > Karol > > >
