-
-
Notifications
You must be signed in to change notification settings - Fork 49
dense output support #40
Comments
What do you mean by dense output? If you want a matrix of the solution vectors you can use |
@berceanu : AFAIK no one is working on dense output, but it would be a nice feature. It might be that we will replace the current @ivarne : Dense output refers to interpolation methods which give the solution between two integration steps. For example, within DOPRI5 this can be done without additional evaluations of the RHS. |
So are you suggesting to implement a stand-along dense output routine, which could then be called by the current |
For DOPRI5 it might make sense to integrate the dense output into the routine, but since we don't have a dedicated |
(Isn't there a long-time goal to get all the functionality in this package into Base, once the API is stable and the code is well-tested?) |
It should at least have a fair chance of being included in the standard distribution as a default package. |
@acroy I guess that by "something that can be used with |
Yes, I guess you will have to modify oderkf. Maybe one can nevertheless put On Friday, June 20, 2014, berceanu [email protected] wrote:
|
I wrote some notes on implementing dense output here: http://nbviewer.ipython.org/github/berceanu/notebooks/blob/master/julia/dense_output.ipynb |
For the API details on dense output, see #44 |
Having read your notebook again, I'm beginning to get the feeling that a solver with dense output is something a user would want when the workflow is to first solve the ODE problem, and then find the solution at some specific points, which are not necessarily known at the time of solving. In other words, the output from a solver with dense output support, whatever type of object(s) we return, somehow needs to support a posteriori evaluation anywhere on the timeline. Since this is extra work which we don't want to do if the user doesn't explicitly ask for it, I think we should probably do it entirely separate from the current Since |
about the usage cases, dense output can for instance be useful in case of an event function. imagine one want to integrate until one has about breaking type stability, im not sure i get why that would be. for |
I might have misunderstood how dense output usually works, but my impression of how it is as useful as possible, is if it is possible to do something like this:
and then evaluate the solution in any point (t,y) simply by evaluating If this functionality is to go in If, on the other hand, the API is to be more or less the same as for some step-limiting dense output-like feature, requiring the user to specify all the points for dense output up front when calling the solver, then this won't be a problem. But I imagine dense output is much less useful that way... |
Ok, so what I had in mind was an API like matlab's, see in particular the I agree that having the possibility of evaluating the solution at any point in the given interval would be very useful, but to my undestanding neither Hairer's |
I would implement it by letting This is admittedly a lot more work than just adding dense output to the existing function, but I do think it adds quite a lot of value. It's very possible that we could make |
I gave your suggestion a bit more thought. Let's say we want the solution for any time We define
And the function
We call it to get the array of times, solutions, steps and coefficients
where
|
Sorry for the overlap between our last 2 comments, I posted mine before I saw yours. I guess they converge somehow? |
@berceanu Yeah, mostly =) The only difference being the exact API - I was thinking to mimic how Grid.jl does it -but that's not my prime concern at the moment. First we need to decide a few other things:
|
I can try to answer for the class of problems I'm typically insterested in. That is relatively long integration times (thousands of steps) of multidimensional problems.
|
OK, I see. I think I'm beginning to lean more and more heavily toward the following approach, which I hinted at in #44:
Thus, the main difference is whether the specified points are obtained by controlling the steps or by interpolation, but the results of the two methods will be almost the same - especially, If we do it this way, both can be easily integrated in Does this sound like a reasonable approach? |
That sounds like a reasonable solution. I think the difference between |
I agree, @tlycken's proposal sounds good. Dense output is mainly (only?) relevant for explicit Runge Kutta methods, so I would say that the general API should only support |
@ivarne I've sometimes used @acroy makes a valid point too: any solver can be made to support |
I would like to know if dense output, in particular for ode45, is in the works or not.
If not, I could give it a try, however
The text was updated successfully, but these errors were encountered: