Skip to content

Commit fca11b2

Browse files
Update MATLABDiffEq.jl
1 parent a4ec7ed commit fca11b2

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/MATLABDiffEq.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ module MATLABDiffEq
55
using Reexport
66
@reexport using DiffEqBase
77
using MATLAB
8-
import DiffEqBase: solve
98

10-
abstract MATLABAlgorithm <: AbstractODEAlgorithm
9+
abstract MATLABAlgorithm <: DiffEqBase.AbstractODEAlgorithm
1110
immutable ode23 <: MATLABAlgorithm end
1211
immutable ode45 <: MATLABAlgorithm end
1312
immutable ode113 <: MATLABAlgorithm end
@@ -17,13 +16,15 @@ immutable ode23tb <: MATLABAlgorithm end
1716
immutable ode15s <: MATLABAlgorithm end
1817
immutable ode15i <: MATLABAlgorithm end
1918

20-
function solve{uType,tType,isinplace,AlgType<:MATLABAlgorithm}(
21-
prob::AbstractODEProblem{uType,tType,isinplace},
19+
function DiffEqBase.__solve{uType,tupType,isinplace,AlgType<:MATLABAlgorithm}(
20+
prob::DiffEqBase.AbstractODEProblem{uType,tupType,isinplace},
2221
alg::AlgType,timeseries=[],ts=[],ks=[];
23-
saveat=tType[],timeseries_errors=true,reltol = 1e-3, abstol = 1e-6,
22+
saveat=eltype(tType)[],timeseries_errors=true,reltol = 1e-3, abstol = 1e-6,
2423
kwargs...)
24+
25+
tType = eltype(tupType)
2526

26-
if !(typeof(prob.f) <: AbstractParameterizedFunction)
27+
if !(typeof(prob.f) <: DiffEqBase.AbstractParameterizedFunction)
2728
error("Functions must be defined via ParameterizedFunctions.jl to work with this package.")
2829
end
2930

@@ -79,7 +80,7 @@ function solve{uType,tType,isinplace,AlgType<:MATLABAlgorithm}(
7980
timeseries = timeseries_tmp
8081
end
8182

82-
build_solution(prob,alg,ts,timeseries,
83+
DiffEqBase.build_solution(prob,alg,ts,timeseries,
8384
timeseries_errors = timeseries_errors)
8485
end
8586

0 commit comments

Comments
 (0)