[petsc-dev] TSSolve() shouldn't return a time
Barry Smith
bsmith at mcs.anl.gov
Sun Oct 23 15:18:49 CDT 2011
I wasn't thinking of anything so complicated. Just having a separate routine TSGetCurrentTime() or something to tell you the time after you called TSSolve().
Barry
On Oct 23, 2011, at 2:55 PM, Jed Brown wrote:
> On Sun, Oct 23, 2011 at 14:28, Barry Smith <bsmith at mcs.anl.gov> wrote:
> That harkens back to the days of old when KSPSolve() returned the number of iterations :-)
>
> You might be right here, but there was a rationale for the current interface. The user decides whether they want to hit an exact final time. This final time might not actually be the end of the simulation, they just want to get the solution at that time, do some things, and continue without changing the state held by the time stepper (e.g. the last couple step values which are used by multistep methods). TSGetSolution() and TSGetTime() naturally return the solution and time at the end of the most recently completed step. This is not the "final time", so we would need new accessors that are only callable immediately after completion of the last step to get the solution value and associated time.
>
> Alternatively, we could do away with exact final time completely and have the user call TSInterpolate() manually if they want it. If we did that, then TSSolve() should probably take no parameters and we'll make TSSetSolution() mandatory. Regardless, we need a way to request "continue where you left off after hitting this exact time, then give me the solution at the exact final time that I just set", since this isn't supported in the current model.
More information about the petsc-dev
mailing list