Skip to content

Commit

Permalink
fix functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Jul 15, 2018
1 parent d3c5bae commit 39bfa91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ function DiffEqBase.__init(
# of the form f(du,u,p,t) or f(u,p,t) such that ODE algorithms can be applied
dde_h = HistoryFunction(prob.h, sol, integrator)
if iip
dde_f = (du,u,p,t) -> prob.f(du,u,dde_h,p,t)
dde_f = ODEFunction((du,u,p,t) -> prob.f(du,u,dde_h,p,t))
else
dde_f = (u,p,t) -> prob.f(u,dde_h,p,t)
dde_f = ODEFunction((u,p,t) -> prob.f(u,dde_h,p,t))
end

# absolut tolerance for fixed-point iterations has to be of same type as elements of u
Expand Down
6 changes: 4 additions & 2 deletions test/dependent_delays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

@testset "constant lag function" begin
# constant delay specified as lag function
prob2 = DDEProblem(DiffEqProblemLibrary.f_1delay, [1.0],
prob2 = DDEProblem(DiffEqProblemLibrary.DDEProblemLibrary.f_1delay,
[1.0],
(p, t) -> [0.0], (0., 10.),
dependent_lags = [(u,p,t) -> 1])
dde_int2 = init(prob2, alg)
Expand Down Expand Up @@ -42,7 +43,8 @@

# without any delays specified is worse
@testset "without delays" begin
prob2 = DDEProblem(DiffEqProblemLibrary.f_1delay, [1.0],
prob2 = DDEProblem(DiffEqProblemLibrary.DDEProblemLibrary.f_1delay,
[1.0],
(p, t) -> [0.0], (0., 10.))
sol2 = solve(prob2, alg)

Expand Down

0 comments on commit 39bfa91

Please sign in to comment.