Home

Awesome

Various basic Ordinary Differential Equation solvers implemented in Julia.

Join the chat at https://gitter.im/JuliaDiffEq/Lobby Build Status Coverage Status

Pull requests are always highly welcome to fix bugs, add solvers, or anything else!

Current status of the project

This project is deprecated in favor of DifferentialEquations.jl and its ODE solvers OrdinaryDiffEq.jl. This library is in "maintanance mode", meaning that it is being upgraded with each Julia version, but not seeing active feature development. ODE.jl contains the basic functionality that was moved here when the package was originally moved from Base. Although quite poorly tested, at least some of the functionality is quite reliable. Use at your own risk.

Usage On the Common Interface

The ODE.jl methods can be used on the common interface. Simply use the solver's name as the algorithm. For example, the ODE tutorial can be solved using ODE.jl's ode45 by using the following commands:

using ODE
f(u,p,t) = 1.01*u
u0=1/2
tspan = (0.0,1.0)
prob = ODEProblem(f,u0,tspan)
sol = solve(prob,ode45(),reltol=1e-8,abstol=1e-8)
using Plots
plot(sol,linewidth=5,title="Solution to the linear ODE with a thick line",
     xaxis="Time (t)",yaxis="u(t) (in μm)",label="My Thick Line!") # legend=false
plot!(sol.t, t->0.5*exp(1.01t),lw=3,ls=:dash,label="True Solution!")

Note that ODE.jl does not natively support inplace updates. Inplace functions f(t,u,du) are converted to out-of-place functions du=f(t,u) and thus it will not be any more efficient.

Basic API

All of the ODE.jl solvers the following basic API:

tout, yout = odeXX(F, y0, tspan; keywords...)

to solve the explicitly defined ODE by dy/dt = F(t,y). A few other solvers are also exported, see the source code for details.

The adaptive solvers accept the following keywords

Additionally, ode23s solver supports

There are also fixed step Runge-Kutta and Rosenbrock solvers available.

Available Solvers

Currently, ODE exports the following adaptive solvers:

For a full list, see the DiffEqDocs ODE Solvers page.

Examples

The examples directory contain a few notebooks that show how to get started. You can also see them here: