Skip to content

/!\ Warning! I don't have the energy to keep working on this project at the moment. Would like to return to it some point in the future, but if you'd like to work on it I'm willing to transfer ownership.

License

DonRyuDragoni/ODE.rs

Repository files navigation

ODE.rs

Published Version Documentation

Build Status Coverage Status

Provide generic solvers for ODEs using different methods. Also, allow the user to choose which datatype they desire to use for that problem, be it f32, u8 or some non-standard bignum type.

By no means this is yet ready for any serious use right now. The code needs to be cleaned and there is a lot yet to be implemented.

Example

use ode::{Method, Solver};

// The interval in time you wish to calculate.
let time_interval: [f32; 2] = [0., 100.];

// The value of y(t = 0).
let initial_condition: Vec<f32> = vec![0.];

// You can configure the solver in a single line:
let _ = Solver::new(&time_interval, &initial_condition)
    .method(Method::RK4);

// Or with multiple statements:
let mut solver = Solver::new(&time_interval, &initial_condition);
solver.method(Method::RK4);

// To run the solver, simply pass the closure of your choice. In this case, I'm
// integrating
//
//     y(t) = 2 * t
let (times, pos) = solver.solve(|t: &f32, _: &Vec<f32>| {
    vec![2.*t]
});

Current Goals

For the next minor version (0.2.0)

  • more and better documentation;
  • re-implement the 4th order Runge-Kutta method;
  • have at least a few tests and examples;
  • stabilize the API.

For the next major version (1.0.0)

  • figure out a generic way to write all Runge-Kutta variants that is both easy to maintain and clean to read;
  • implement all planned Runge-Kutta variants:
    • 2;
    • 3;
    • 4;
    • 5.

If you whant to help this project, check the Contributing file for detailed information. (Spoiler: you're welcome to contribute in any way you feel you can help!)

About

/!\ Warning! I don't have the energy to keep working on this project at the moment. Would like to return to it some point in the future, but if you'd like to work on it I'm willing to transfer ownership.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages