Skip to content

Instantly share code, notes, and snippets.

@acroy
acroy / perf_result.txt
Last active November 12, 2016 20:46
Some crude benchmarking for ODE.jl
== problem A3 in DETEST ==
testing method ode23
elapsed time: 0.069644091 seconds (12007840 bytes allocated)
* number of steps: 307
* minimal step: 0.017235477520255074
* maximal step: 0.13251841618852822
* maximal deviation from known solution: 0.00024150339669093412
testing method ode23_bs
@acroy
acroy / example_pendulum.jl
Created January 27, 2014 11:41
example for symplectic integration with ODE.verlet : pendulum
# symplectic integration
## pedulum
using Winston
using ODE
# rhs
function pendulum(t, q)
return -sin(q)
end
@acroy
acroy / example_ho.jl
Created January 27, 2014 11:23
example for symplectic integration with ODE.verlet : harmonic oscillator
# symplectic integration
## harmonic oscillator
using Winston
using ODE
# rhs
function harmonic_oscillator(t, q)
return -q
end
@acroy
acroy / ode_custom_type.jl
Created June 14, 2014 21:59
Demonstrates how a custom type can be used with the solvers in ODE.jl
using ODE
import Base.norm # we will extend norm to support our new type
const delta0 = 0.
const V0 = 1.
const g0 = 0.
################################################################################
# define custom type ...