## HOODESolver.jl

High Oscillatory Ordinary Differential Equation Solver in Julia
Author pnavaro
Popularity
16 Stars
Updated Last
11 Months Ago
Started In
December 2020

# HOODESolver.jl

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$.

## Installation

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

## Usage

The following is an example with the system of Hénon-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.

## How to Contribute

Here's an outline of the workflow you should use if you want to make contributions to this package.

1. Fork this repository
2. Make a new branch on your fork, named after whatever changes you'll be making
4. When you're done, submit a PR to HOODESolver.jl to merge your fork into master branch.