Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend WorkPrecisionSet to DDE problems #7

Merged
merged 2 commits into from
Apr 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/benchmark.jl
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,9 @@ function WorkPrecision(prob,alg,abstols,reltols,dts=nothing;
return WorkPrecision(prob,abstols,reltols,errors,times,name,N)
end

function WorkPrecisionSet(prob::AbstractODEProblem,abstols,reltols,setups;numruns=20,
function WorkPrecisionSet(prob::Union{AbstractODEProblem,AbstractDDEProblem,
AbstractDAEProblem},
abstols,reltols,setups;numruns=20,
print_names=false,names=nothing,appxsol=nothing,
error_estimate=:final,
test_dt=nothing,kwargs...)
Expand Down
1 change: 1 addition & 0 deletions test/REQUIRE
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
DiffEqProblemLibrary
OrdinaryDiffEq 1.0.0
DelayDiffEq
StochasticDiffEq 0.0.5
FiniteElementDiffEq 0.0.5
14 changes: 13 additions & 1 deletion test/benchmark_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using OrdinaryDiffEq, DiffEqDevTools, DiffEqProblemLibrary, DiffEqBase, Base.Test
using OrdinaryDiffEq, DelayDiffEq, DiffEqDevTools, DiffEqProblemLibrary, DiffEqBase, Base.Test

## Setup Tests

Expand Down Expand Up @@ -96,3 +96,15 @@ setups = [Dict(:alg=>DP5())
Dict(:alg=>Vern6())
]
wp = WorkPrecisionSet(prob,abstols,reltols,setups;appxsol=test_sol,save_everystep=false,numruns=20,maxiters=10000)

# DDE problem
prob = prob_dde_1delay

abstols = 1./10.^(7:10)
reltols = 1./10.^(4:7)
sol = solve(prob, MethodOfSteps(Vern9(), max_fixedpoint_iters=1000); reltol=1e-14, abstol=1e-14)
test_sol = TestSolution(sol)

setups = [Dict(:alg => MethodOfSteps(BS3()))
Dict(:alg => MethodOfSteps(Tsit5()))]
wp = WorkPrecisionSet(prob, abstols, reltols, setups; appxsol = test_sol)