[petsc-dev] TSSolve() shouldn't return a time

Jed Brown jedbrown at mcs.anl.gov
Sun Oct 23 14:55:10 CDT 2011


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20111023/743b3e7b/attachment.html>


More information about the petsc-dev mailing list