Added test for using eltype(tspan)==Int and typeof(y0)=Int#96
Added test for using eltype(tspan)==Int and typeof(y0)=Int#96mauro3 wants to merge 2 commits intoSciML:masterfrom
Conversation
Also fixed ode23s to allow for it.
Current coverage is 93.96%
|
and fixed runge-kutta solvers to cope with it.
|
Added test and fix for using an integer as |
|
Is so that instead of supporting |
|
I don't think it needs to be type stable if we use barrier-functions (which is not the case yet...). If the type on which the iterator is based on is constructed using leaftypes only then it should be fine and it doesn't matter that figuring out the leaftypes is done by an type-unstable function. We may want to draw the line at things like I think one of the points of having pure Julia implementations of ode-solvers is to be able to use them with any Julia type (as long as that type supports certain operations). |
|
As mauro3 noted, you don't need type-stability if you shield the main loop inside another function which is type-stable. However, since that's not currently done, there is a chance that this will cause everything to "Box" and maybe cause issues with type-inference (maybe, because sometimes the boxing isn't an issue). Did you benchmark and check the native code for Int and Float64 inputs at all? However, I don't think hard-coding Float64 is ever a good idea. For example, I'm pretty sure this will throw an |
|
We decided not to go this way and we are now throwing an error if there are any conversions to be made by the solver: https://github.com/JuliaODE/ODE.jl/blob/dev/test/top-interface.jl#L78-L84. Any conversions that we come up with were simply too ambiguous and arbitrary, it's better if the user does them explicitly. It's still a little early to do any benchmarks, but I have them in mind and we will do the optimization once we are happy with the current implementation of #49. |
|
Should this be closed then? |
|
I would say so. |
We previously had problems with calls of the sort
ode((t,y)->2t, 0., [0,1])wheretspanis aVector{Int}. This adds a test to check that the solvers support this call. It showed thatode23sdidn't and also fixes this.