High Oscillatory Ordinary Differential Equation Solver in Julia
MIT License
A Julia package for solving numerically highly-oscillatory ODE problems
This Julia package implements Uniformly Accurate numerical methods (UA) for highly oscillating problems. We propose to solve the following equation:
$$\frac{d u(t)}{dt} = \frac{1}{\varepsilon} A u(t) + f(t, u(t)), \qquad u(t=t_{start})=u_{in}, \qquad \varepsilon \in ]0, 1],$$
with
$u : t \in [t_{start}, t_{end}] \mapsto u(t) \in \mathbb{R}^n, t_{start}, t_{end} \in \mathbb{R}, \qquad u_{in}\in \mathbb{R}^n$,
$A\in {\mathcal{M}}_{n,n}(\mathbb{R})\quad$ is such that $\quad \tau \mapsto e^{\tau A}\quad$ is $2 \pi$-periodic, $\quad f : (t, u) \in \mathbb{R} \times \mathbb{R}^n \mapsto \mathbb{R}^n$.
HOODESolver.jl is a registered package and can be installed using the Julia package manager. From the Julia REPL, enter Pkg mode (by pressing ]
)
julia>]
(@v1.5) pkg> add HOODESolver
The following is an example with the system of Hnon-Heiles. Please see the documentation for further usage, tutorials, and api reference.
using HOODESolver
using Plots
epsilon= 0.0001
A = [ 0 0 1 0 ;
0 0 0 0 ;
-1 0 0 0 ;
0 0 0 0 ]
f1 = LinearHOODEOperator( epsilon, A)
f2 = (u,p,t) -> [ 0, u[4], 2*u[1]*u[2], -u[2] - u[1]^2 + u[2]^2 ]
tspan = (0.0, 3.0)
u0 = [0.55, 0.12, 0.03, 0.89]
prob = SplitODEProblem(f1, f2, u0, tspan)
solve the defined problem
sol = solve(prob, HOODEAB())
plot(sol)
For support with using HOODESolver.jl, please open an issue describing the problem and steps to reproduce it.
Here's an outline of the workflow you should use if you want to make contributions to this package.
HOODESolver.jl
to merge your fork into master branch.This package is licensed under the MIT Expat license. See LICENSE for more information.