[petsc-dev] TSSolve web page JED and EMIL READ THIS!
Jed Brown
jed at jedbrown.org
Fri Feb 6 20:03:27 CST 2015
Barry Smith <bsmith at mcs.anl.gov> writes:
> I note that with the current code if you run TSSolve() with
> TS_EXACTFINALTIME_INTERPOLATE and then another TSSolve to continue
> solving for later time it actually uses the "interpolated" value as
> the starting point for the next solve (and not the final solution
> of the previous TSSolve()). Is this not intended? If it is ok then
> we simplify the code by simply interpolating the final solution
> into ts->vec_sol (and hence not even save the final "solution") and
> simplify the code and the API. If it is suppose to restart from the
> previous final solution (not interpolated) then the code needs to
> be fixed up.
I don't know how to make semantics that would ignore the interpolated
vector passed as u and continue from the stored state without being
disastrously confusing. I think if the user wants to call TSSolve in a
loop, they should use TS_EXACTFINALTIME_STEPOVER and call
TSInterpolateSolution themselves.
> An alternative is to say that TSSolve() always returns the solution
> at a time step and require the user to call something like
> TSInterpolateSolution(ts,w); to get the solution at the interpolated
> time?
If we thought that TS_EXACTFINALTIME_INTERPOLATE was the only mode for
reaching an exact time, I would be in favor of this. But one might want
to compare TS_EXACTFINALTIME_INTERPOLATE with
TS_EXACTFINALTIME_MATCHSTEP and it's wasteful to call
TSInterpolateSolution and ugly logic to check the TSExactFinalTimeOption
and do something different in that case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150206/b713677f/attachment.sig>
More information about the petsc-dev
mailing list