@@ -14,26 +14,30 @@ _is_matlab_compatible_eltype(::Type) = false
1414function _check_matlab_compatible (u0, tspan)
1515 T = eltype (u0)
1616 if ! _is_matlab_compatible_eltype (T)
17- throw (ArgumentError (
18- " MATLABDiffEq.jl requires Float64-compatible element types. " *
19- " Got eltype(u0) = $T . MATLAB does not support arbitrary precision " *
20- " (BigFloat) or GPU arrays (JLArrays, CuArrays). Please convert your " *
21- " initial conditions to Float64: u0 = Float64.(u0)"
22- ))
17+ throw (
18+ ArgumentError (
19+ " MATLABDiffEq.jl requires Float64-compatible element types. " *
20+ " Got eltype(u0) = $T . MATLAB does not support arbitrary precision " *
21+ " (BigFloat) or GPU arrays (JLArrays, CuArrays). Please convert your " *
22+ " initial conditions to Float64: u0 = Float64.(u0)"
23+ )
24+ )
2325 end
2426 tT = eltype (tspan)
2527 if ! _is_matlab_compatible_eltype (tT)
26- throw (ArgumentError (
27- " MATLABDiffEq.jl requires Float64-compatible time span types. " *
28- " Got eltype(tspan) = $tT . MATLAB does not support arbitrary precision " *
29- " (BigFloat). Please use Float64 for tspan: tspan = Float64.(tspan)"
30- ))
28+ throw (
29+ ArgumentError (
30+ " MATLABDiffEq.jl requires Float64-compatible time span types. " *
31+ " Got eltype(tspan) = $tT . MATLAB does not support arbitrary precision " *
32+ " (BigFloat). Please use Float64 for tspan: tspan = Float64.(tspan)"
33+ )
34+ )
3135 end
3236 # Check that the array type itself is a standard Julia array
3337 if ! (u0 isa Array || u0 isa Number)
3438 @warn " MATLABDiffEq.jl works best with standard Julia Arrays. " *
35- " Got $(typeof (u0)) . The array will be converted to a standard Array " *
36- " before being sent to MATLAB."
39+ " Got $(typeof (u0)) . The array will be converted to a standard Array " *
40+ " before being sent to MATLAB."
3741 end
3842 return nothing
3943end
@@ -63,11 +67,11 @@ function DiffEqBase.__solve(
6367 ks = [];
6468 saveat = eltype (tupType)[],
6569 timeseries_errors = true ,
66- reltol = 1e -3 ,
67- abstol = 1e -6 ,
70+ reltol = 1.0e -3 ,
71+ abstol = 1.0e -6 ,
6872 callback = nothing ,
6973 kwargs...
70- ) where {uType, tupType, isinplace, AlgType <: MATLABAlgorithm }
74+ ) where {uType, tupType, isinplace, AlgType <: MATLABAlgorithm }
7175 # Validate that input types are MATLAB-compatible
7276 _check_matlab_compatible (prob. u0, prob. tspan)
7377
@@ -144,7 +148,7 @@ function DiffEqBase.__solve(
144148
145149 stats = buildDEStats (solstats)
146150
147- DiffEqBase. build_solution (
151+ return DiffEqBase. build_solution (
148152 prob,
149153 alg,
150154 ts,
@@ -170,7 +174,7 @@ function buildDEStats(solverstats::Dict{String, <:Any})::DiffEqBase.Stats
170174 destats. nsolve = Int (get (solverstats, " nsolves" , 0 ))
171175 destats. njacs = Int (get (solverstats, " npds" , 0 ))
172176 destats. nw = Int (get (solverstats, " ndecomps" , 0 ))
173- destats
177+ return destats
174178end
175179
176180@setup_workload begin
0 commit comments