Crates.io | diffsol |
lib.rs | diffsol |
version | |
source | src |
created_at | 2024-02-20 13:19:35.773893 |
updated_at | 2024-12-11 15:46:14.479933 |
description | A library for solving ordinary differential equations (ODEs) in Rust. |
homepage | |
repository | https://github.com/martinjrobins/diffsol |
max_upload_size | |
id | 1146390 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Diffsol is a library for solving ordinary differential equations (ODEs) or semi-explicit differential algebraic equations (DAEs) in Rust. You can use it out-of-the-box with vectors and matrices from the nalgebra or faer crates, or you can implement your own types by implementing the various vector and matrix traits in diffsol.
DiffSol implements the following solvers:
tr_bdf2
or esdirk34
).All solvers feature:
For comparison, the BDF solvers are similar to MATLAB's ode15s
solver, the bdf
solver in SciPy's solve_ivp
function, or the BDF solver in SUNDIALS.
The ESDIRK solver using the provided tr_bdf2
tableau is similar to MATLAB's ode23t
solver.
Users can specify the equations to solve in the following ODE form, either using closures or the DiffSL Domain Specific Language (DSL):
M \frac{dy}{dt} = f(t, y, p)
where $M$ is a (possibly singular) mass matrix, $y$ is the state vector, $t$ is the time, $p$ is a vector of parameters, and $f$ is the right-hand side function. The mass matrix $M$ is optional (assumed to be the identity matrix if not provided).
See instructions on the crates.io page.
For more documentation and examples, see the API documentation.