Skip to content

Commit

Permalink
Fix deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
femtocleaner[bot] committed Jul 16, 2018
1 parent 19a730d commit d562106
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/dae_default_alg.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function default_algorithm{uType,duType,tType,isinplace}(prob::DiffEqBase.AbstractDAEProblem{uType,duType,tType,isinplace};kwargs...)
function default_algorithm(prob::DiffEqBase.AbstractDAEProblem{uType,duType,tType,isinplace};kwargs...) where {uType,duType,tType,isinplace}
o = Dict{Symbol,Any}(kwargs)
extra_kwargs = Any[]; alg=IDA() # Standard default
uEltype = eltype(prob.u0)
Expand Down
2 changes: 1 addition & 1 deletion src/dde_default_alg.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function default_algorithm{uType,tType,lType,isinplace}(prob::DiffEqBase.AbstractDDEProblem{uType,tType,lType,isinplace};kwargs...)
function default_algorithm(prob::DiffEqBase.AbstractDDEProblem{uType,tType,lType,isinplace};kwargs...) where {uType,tType,lType,isinplace}
o = Dict{Symbol,Any}(kwargs)
extra_kwargs = Any[]; alg = MethodOfSteps(AutoTsit5(Rosenbrock23(autodiff=false))) # Standard default
uEltype = eltype(prob.u0)
Expand Down
2 changes: 1 addition & 1 deletion src/default_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function DiffEqBase.__solve(prob::DiffEqBase.DEProblem,args...;default_set=false
end
end

function DiffEqBase.__solve(prob::DiffEqBase.DEProblem,alg::Union{Void,DiffEqBase.DEAlgorithm},
function DiffEqBase.__solve(prob::DiffEqBase.DEProblem,alg::Union{Nothing,DiffEqBase.DEAlgorithm},
args...;default_set=false,kwargs...)
if default_set == true
error("The chosen algorithm, $alg, does not exist. Please verify that the appropriate solver package has been installed.")
Expand Down
2 changes: 1 addition & 1 deletion src/ode_default_alg.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function default_algorithm{uType,tType,inplace}(prob::DiffEqBase.AbstractODEProblem{uType,tType,inplace};kwargs...)
function default_algorithm(prob::DiffEqBase.AbstractODEProblem{uType,tType,inplace};kwargs...) where {uType,tType,inplace}
o = Dict{Symbol,Any}(kwargs)
extra_kwargs = Any[]; alg=AutoTsit5(Rosenbrock23(autodiff=false)) # Standard default
uEltype = eltype(prob.u0)
Expand Down
2 changes: 1 addition & 1 deletion src/sde_default_alg.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function default_algorithm{uType,tType,isinplace,ND}(prob::DiffEqBase.AbstractSDEProblem{uType,tType,isinplace,ND};kwargs...)
function default_algorithm(prob::DiffEqBase.AbstractSDEProblem{uType,tType,isinplace,ND};kwargs...) where {uType,tType,isinplace,ND}
o = Dict{Symbol,Any}(kwargs)
extra_kwargs = Any[]; alg=SOSRI() # Standard default
uEltype = eltype(prob.u0)
Expand Down
2 changes: 1 addition & 1 deletion test/default_dde_alg_test.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DifferentialEquations, Base.Test
using DifferentialEquations, Test

lags = [.2]
f = function (u,h,p,t)
Expand Down
2 changes: 1 addition & 1 deletion test/default_discrete_alg_test.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DifferentialEquations, Base.Test
using DifferentialEquations, Test

prob = DiscreteProblem(zeros(2),(0.0,1.0))
sol = solve(prob)
Expand Down
6 changes: 3 additions & 3 deletions test/default_ode_alg_test.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DifferentialEquations, DiffEqProblemLibrary, Base.Test
using DifferentialEquations, DiffEqProblemLibrary, Test

using DiffEqProblemLibrary.ODEProblemLibrary: importodeproblems; importodeproblems()
import DiffEqProblemLibrary.ODEProblemLibrary: prob_ode_2Dlinear
Expand Down Expand Up @@ -56,11 +56,11 @@ sol =solve(prob_ode_bigfloat2Dlinear,nothing;alg_hints=[:stiff])

@test typeof(sol.alg) <: Rodas4

immutable FooAlg end
struct FooAlg end

@test_throws ErrorException solve(prob_ode_bigfloat2Dlinear,FooAlg();default_set=true)

immutable FooAlg2 <: DiffEqBase.DEAlgorithm end
struct FooAlg2 <: DiffEqBase.DEAlgorithm end

@test_throws ErrorException solve(prob_ode_bigfloat2Dlinear,FooAlg2();default_set=true)

Expand Down
2 changes: 1 addition & 1 deletion test/default_rode_alg_test.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DifferentialEquations, Base.Test
using DifferentialEquations, Test

f = (u,p,t,W) -> 1.01u.+0.87u.*W
u0 = 1.00
Expand Down
2 changes: 1 addition & 1 deletion test/default_sde_alg_test.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DifferentialEquations, DiffEqProblemLibrary, Base.Test
using DifferentialEquations, DiffEqProblemLibrary, Test

using DiffEqProblemLibrary.SDEProblemLibrary: importsdeproblems; importsdeproblems()
import DiffEqProblemLibrary.SDEProblemLibrary: prob_sde_additive
Expand Down
2 changes: 1 addition & 1 deletion test/default_steady_state_alg_test.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using DifferentialEquations, Base.Test
using DifferentialEquations, Test

f = function (du,u,p,t)
du[1] = 2 - 2u[1]
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env julia

using DifferentialEquations, Base.Test
using DifferentialEquations, Test
println("Starting tests")
@time @testset "Default Discrete Algorithm" begin include("default_discrete_alg_test.jl") end
@time @testset "Default ODE Algorithm" begin include("default_ode_alg_test.jl") end
Expand Down

0 comments on commit d562106

Please sign in to comment.