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

Completeness for benchmarking #51

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions src/SimpleDiffEq.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using Reexport, MuladdMacro
@reexport using DiffEqBase
using StaticArrays
using RecursiveArrayTools
const ^ = DiffEqBase.fastpow

@inline _copy(a::SArray) = a
@inline _copy(a) = copy(a)
Expand Down
9 changes: 5 additions & 4 deletions src/tsit5/atsit5.jl
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ function DiffEqBase.__init(prob::ODEProblem,alg::SimpleATsit5;
internalnorm)
end

function DiffEqBase.__solve(prob::ODEProblem,alg::SimpleATsit5;
function DiffEqBase.__solve(prob::ODEProblem,alg::SimpleATsit5,args...;
dt = 0.1, saveat = nothing, save_everystep = true,
abstol = 1e-6, reltol = 1e-3,
internalnorm = DiffEqBase.ODE_DEFAULT_NORM)
internalnorm = DiffEqBase.ODE_DEFAULT_NORM,kwargs...)
u0 = prob.u0
tspan = prob.tspan
ts = Vector{eltype(dt)}(undef,1)
Expand All @@ -78,6 +78,7 @@ function DiffEqBase.__solve(prob::ODEProblem,alg::SimpleATsit5;
integ = simpleatsit5_init(prob.f,DiffEqBase.isinplace(prob),prob.u0,
tspan[1], tspan[2], dt, prob.p, abstol, reltol, internalnorm)
# FSAL
cur_t = 1
while integ.t < tspan[2]
step!(integ)
if saveat === nothing && save_everystep
Expand All @@ -96,8 +97,8 @@ function DiffEqBase.__solve(prob::ODEProblem,alg::SimpleATsit5;
end

if saveat === nothing && !save_everystep
push!(us,recursivecopy(u))
push!(ts,t)
push!(us,recursivecopy(integ.u))
push!(ts,integ.t)
end

sol = DiffEqBase.build_solution(prob,alg,ts,us,
Expand Down