[petsc-dev] TSSet{Pre,Post}Step

Jed Brown jed at 59A2.org
Sat Mar 6 09:01:58 CST 2010


On Tue, 2 Mar 2010 14:49:39 -0500, Kai Germaschewski <kai.germaschewski at unh.edu> wrote:
> I think I actually still have the patches floating around somewhere,

I wouldn't mind looking at them if you'd like to send them to me.

> One might argue that this is over-abstracting things, though.

I don't think it is, especially since robust error control is complex
enough that we'd rather not put it in every implementation.  Also note
that linear multistep methods can be written in Nordsieck form in which
case they don't need a custom outer loop (they only need to do one
step).

> On a general note, somehow I don't think it's right to start making those
> changes 5 minutes before a release, unless there's a real good reason.

I only changed the behavior of TSSetPreStep and TSSetPostStep to get
these hooks run before and after each step, which is what their name
implies.  I have plans for a much more significant TS refactor, but I'm
not going to touch that until after the release.  TSGL has adaptive
order adaptive step controllers, and I think that adaptivity should be
encapsulated in this way (to facilitate robust generic controllers),
rather than through user-provided pre- and post-step hooks.  I see the
pre- and post-step hooks mainly being relevant for IMEX schemes where
PETSc's TS is only told about the implicit system.

> Also if you make incompatible changes, do them in a way that they
> break existing code instead of causing silent corruption/nonsense.

I generally agree with this, but only if the resulting names make sense.
That is, I value interface consistency above compile-time checking of
backward-incompatibility above true backward-compatibility.  Since
TSSet{Pre,Post}Step were not capable of doing anything complex with
their old behavior, I don't expect my change to cause problems.

Jed



More information about the petsc-dev mailing list