Janssena:
What you can see above is that A[1] is filled with the dose from the callback, causing dA[1] to be negative. This time however u[1] remains 0., causing the result to become negative. After some time the concentration in A[2] is large enough to actually start filling A[1], so A[1] becomes postive again.
Setting save_positions = (true, true) for the callback fixes the issue.
Is this a expected issue when using interpolation? I of course can manage with using saveat, and setting save_positions = true when I need to use interpolation, but I would expect save_positions to only save the positions to the sol.t, and not affect the solution in other ways, as seems to be the case.
What are your thoughts? Is this a bug?
Yes, it’s expected. If you don’t save the discontinuity points, how could you ever interpolate correctly? You need to save each of the points and two points at a jump discontinuity in order to do it.