Fix release metadata and repair the benchmarks
- repository pointed at the old host and the old repo name; this is the link crates.io and docs.rs display - the readme example imported `differential_equations`, so it could not compile under the crate's published name - `cargo bench` did not build: `Solution` borrows the ODE, so `.solve()` cannot be called on a temporary `Problem`. Bind it first.
This commit is contained in:
1 parent
ffd9efa15c
commit
1f2070d110
4 files changed
+10
-7
No files matched your search
+2
-2
@@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "ordinary-diffeq"
|
||||
version = "0.3.0"
|
||||
version = "0.3.1"
|
||||
edition = "2021"
|
||||
authors = ["Connor Johnstone"]
|
||||
description = "A library for solving differential equations based on the DifferentialEquations.jl julia library."
|
||||
readme = "readme.md"
|
||||
repository = "https://gitlab.rcjohnstone.com/connor/differential-equations"
|
||||
repository = "https://git.rcjohnstone.com/connor/ordinary-diffeq"
|
||||
license = "MIT"
|
||||
exclude = ["roadmap/"]
|
||||
|
||||
|
||||
@@ -200,7 +200,8 @@ fn bench_interpolation(c: &mut Criterion) {
|
||||
let bs3 = BS3::new().a_tol(tol).r_tol(tol);
|
||||
b.iter(|| {
|
||||
black_box({
|
||||
let solution = Problem::new(ode, bs3, controller).solve();
|
||||
let mut problem = Problem::new(ode, bs3, controller);
|
||||
let solution = problem.solve();
|
||||
// Interpolate at 100 points
|
||||
let _: Vec<_> = (0..100).map(|i| solution.interpolate(i as f64 * 0.05)).collect();
|
||||
});
|
||||
@@ -213,7 +214,8 @@ fn bench_interpolation(c: &mut Criterion) {
|
||||
let dp45 = DormandPrince45::new().a_tol(tol).r_tol(tol);
|
||||
b.iter(|| {
|
||||
black_box({
|
||||
let solution = Problem::new(ode, dp45, controller).solve();
|
||||
let mut problem = Problem::new(ode, dp45, controller);
|
||||
let solution = problem.solve();
|
||||
// Interpolate at 100 points
|
||||
let _: Vec<_> = (0..100).map(|i| solution.interpolate(i as f64 * 0.05)).collect();
|
||||
});
|
||||
|
||||
@@ -45,7 +45,8 @@ fn bench_interpolation_1d(c: &mut Criterion) {
|
||||
c.bench_function("bench_interpolation_1d", |b| {
|
||||
b.iter(|| {
|
||||
std::hint::black_box({
|
||||
let solution = Problem::new(ode, dp45, controller).solve();
|
||||
let mut problem = Problem::new(ode, dp45, controller);
|
||||
let solution = problem.solve();
|
||||
let _ = (0..100).map(|t| solution.interpolate(t as f64 * 0.1)[0]);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# DifferentialEquations
|
||||
# ordinary-diffeq
|
||||
|
||||
A library, written in Rust, for integrating ordinary differential equations. For now, this is
|
||||
relatively simple, but it does have key features that are needed for orbit propagation, ray tracing,
|
||||
@@ -47,7 +47,7 @@ pendulum problem):
|
||||
|
||||
```rust
|
||||
use nalgebra::Vector2;
|
||||
use differential_equations::prelude::*;
|
||||
use ordinary_diffeq::prelude::*;
|
||||
use std::f64::consts::PI;
|
||||
|
||||
// Define the system (parameters, derivative, and initial state)
|
||||
|
||||
Reference in new issue
Block a user