Skip to content

Commit

Permalink
Fix inference specialization in interpolations
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Aug 16, 2021
1 parent 3d04ae7 commit 393011d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/solutions/dae_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ struct DAESolution{T,N,uType,duType,uType2,DType,tType,P,A,ID,DE} <: AbstractDAE
destats::DE
retcode::Symbol
end
(sol::DAESolution)(t,deriv::Type=Val{0};idxs=nothing,continuity=:left) = sol.interp(t,idxs,deriv,sol.prob.p,continuity)
(sol::DAESolution)(v,t,deriv::Type=Val{0};idxs=nothing,continuity=:left) = sol.interp(v,t,idxs,deriv,sol.prob.p,continuity)
(sol::DAESolution)(t,::Type{deriv}=Val{0};idxs=nothing,continuity=:left) where {deriv} = sol.interp(t,idxs,deriv,sol.prob.p,continuity)
(sol::DAESolution)(v,t,::Type{deriv}=Val{0};idxs=nothing,continuity=:left) where {deriv} = sol.interp(v,t,idxs,deriv,sol.prob.p,continuity)

function build_solution(prob::AbstractDAEProblem, alg, t, u, du = nothing;
timeseries_errors = length(u) > 2,
Expand Down
4 changes: 2 additions & 2 deletions src/solutions/ode_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ struct ODESolution{T,N,uType,uType2,DType,tType,rateType,P,A,IType,DE} <: Abstra
destats::DE
retcode::Symbol
end
(sol::ODESolution)(t,deriv::Type=Val{0};idxs=nothing,continuity=:left) = sol(t,deriv,idxs,continuity)
(sol::ODESolution)(v,t,deriv::Type=Val{0};idxs=nothing,continuity=:left) = sol.interp(v,t,idxs,deriv,sol.prob.p,continuity)
(sol::ODESolution)(t,::Type{deriv}=Val{0};idxs=nothing,continuity=:left) where {deriv} = sol(t,deriv,idxs,continuity)
(sol::ODESolution)(v,t,::Type{deriv}=Val{0};idxs=nothing,continuity=:left) where {deriv} = sol.interp(v,t,idxs,deriv,sol.prob.p,continuity)

function (sol::ODESolution)(t::Real,deriv,idxs::Nothing,continuity)
sol.interp(t,idxs,deriv,sol.prob.p,continuity)
Expand Down
4 changes: 2 additions & 2 deletions src/solutions/rode_solutions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ struct RODESolution{T,N,uType,uType2,DType,tType,randType,P,A,IType,DE} <: Abstr
retcode::Symbol
seed::UInt64
end
(sol::RODESolution)(t,deriv::Type=Val{0};idxs=nothing,continuity=:left) = sol.interp(t,idxs,deriv,sol.prob.p,continuity)
(sol::RODESolution)(v,t,deriv::Type=Val{0};idxs=nothing,continuity=:left) = sol.interp(v,t,idxs,deriv,sol.prob.p,continuity)
(sol::RODESolution)(t,::Type{deriv}=Val{0};idxs=nothing,continuity=:left) where {deriv} = sol.interp(t,idxs,deriv,sol.prob.p,continuity)
(sol::RODESolution)(v,t,::Type{deriv}=Val{0};idxs=nothing,continuity=:left) where {deriv} = sol.interp(v,t,idxs,deriv,sol.prob.p,continuity)

function build_solution(
prob::Union{AbstractRODEProblem,AbstractSDDEProblem},
Expand Down

0 comments on commit 393011d

Please sign in to comment.