@@ -553,8 +553,8 @@ ode_interpolation(tvals,ts,timeseries,ks)
553
553
Get the value at tvals where the solution is known at the
554
554
times ts (sorted), with values timeseries and derivatives ks
555
555
"""
556
- function ode_interpolation (tvals, id:: I , idxs, deriv:: D , p,
557
- continuity:: Symbol = :left ) where {I, D }
556
+ function ode_interpolation (tvals, id:: I , idxs, deriv:: Type{deriv} , p,
557
+ continuity:: Symbol = :left ) where {I, deriv }
558
558
@unpack ts, timeseries, ks, f, cache, differential_vars = id
559
559
@inbounds tdir = sign (ts[end ] - ts[1 ])
560
560
idx = sortperm (tvals, rev = tdir < 0 )
@@ -575,7 +575,7 @@ function ode_interpolation(tvals, id::I, idxs, deriv::D, p,
575
575
i₊ = i₋ < lastindex (ts) ? i₋ + 1 : i₋
576
576
end
577
577
id. sensitivitymode && error (SENSITIVITY_INTERP_MESSAGE)
578
- i₋₊ref[] = (i₋, i₊)
578
+ i₋₊ref[] = (i₋, i₊):: Tuple{Int,Int}
579
579
dt = ts[i₊] - ts[i₋]
580
580
Θ = iszero (dt) ? oneunit (t) / oneunit (dt) : (t - ts[i₋]) / dt
581
581
evaluate_interpolant (f, Θ, dt, timeseries, i₋, i₊, cache, idxs,
@@ -591,8 +591,8 @@ ode_interpolation(tvals,ts,timeseries,ks)
591
591
Get the value at tvals where the solution is known at the
592
592
times ts (sorted), with values timeseries and derivatives ks
593
593
"""
594
- function ode_interpolation! (vals, tvals, id:: I , idxs, deriv :: D , p,
595
- continuity:: Symbol = :left ) where {I, D }
594
+ function ode_interpolation! (vals, tvals, id:: I , idxs, :: Type{deriv} , p,
595
+ continuity:: Symbol = :left ) where {I, deriv }
596
596
@unpack ts, timeseries, ks, f, cache, differential_vars = id
597
597
@inbounds tdir = sign (ts[end ] - ts[1 ])
598
598
idx = sortperm (tvals, rev = tdir < 0 )
@@ -756,8 +756,8 @@ ode_interpolation(tval::Number,ts,timeseries,ks)
756
756
Get the value at tval where the solution is known at the
757
757
times ts (sorted), with values timeseries and derivatives ks
758
758
"""
759
- function ode_interpolation (tval:: Number , id:: I , idxs, deriv :: D , p,
760
- continuity:: Symbol = :left ) where {I, D }
759
+ function ode_interpolation (tval:: Number , id:: I , idxs, :: Type{deriv} , p,
760
+ continuity:: Symbol = :left ) where {I, deriv }
761
761
@unpack ts, timeseries, ks, f, cache, differential_vars = id
762
762
@inbounds tdir = sign (ts[end ] - ts[1 ])
763
763
@@ -840,8 +840,8 @@ ode_interpolation!(out,tval::Number,ts,timeseries,ks)
840
840
Get the value at tval where the solution is known at the
841
841
times ts (sorted), with values timeseries and derivatives ks
842
842
"""
843
- function ode_interpolation! (out, tval:: Number , id:: I , idxs, deriv :: D , p,
844
- continuity:: Symbol = :left ) where {I, D }
843
+ function ode_interpolation! (out, tval:: Number , id:: I , idxs, :: Type{deriv} , p,
844
+ continuity:: Symbol = :left ) where {I, deriv }
845
845
@unpack ts, timeseries, ks, f, cache, differential_vars = id
846
846
@inbounds tdir = sign (ts[end ] - ts[1 ])
847
847
0 commit comments