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

Abstract base refactor #12

Merged
merged 7 commits into from
Dec 20, 2023
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
6 changes: 3 additions & 3 deletions benchmarks/rabi-dormand-prince.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using BenchmarkTools
using DormandPrince:DP5Solver, dopri5
using DormandPrince:DP5Solver, core_integrator

function fcn(x, y, f)
g(x) = 2.2*2π*sin(2π*x)
Expand All @@ -14,6 +14,6 @@ solver = DP5Solver(
ComplexF64[1.0, 0.0]
)

dopri5(solver, 2π)
core_integrator(solver, 2π)

@benchmark dopri5(clean_solver, 2π) setup=(clean_solver = DP5Solver(fcn, 0.0, ComplexF64[1.0, 0.0])) samples=10000 evals=5 seconds=500
@benchmark core_integrator(clean_solver, 2π) setup=(clean_solver = DP5Solver(fcn, 0.0, ComplexF64[1.0, 0.0])) samples=10000 evals=5 seconds=500
20 changes: 20 additions & 0 deletions benchmarks/type_stab.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using DormandPrince: DP5Solver, integrate
using JET: @report_opt


function fcn(x, y, f)
g(x) = 2.2*2π*sin(2π*x)

f[1] = -1im * g(x)/2 * y[2]
f[2] = -1im * g(x)/2 * y[1]
end

solver = DP5Solver(
fcn,
0.0,
ComplexF64[1.0, 0.0]
)

@report_opt integrate(solver, 2π)


Loading
Loading