Skip to content

Commit

Permalink
Ver 0.37.0
Browse files Browse the repository at this point in the history
- Whole new root finding
- from thiserror to anyhow
- Connect with Zenodo
  • Loading branch information
Axect committed Apr 13, 2024
2 parents eed4fa4 + 1d3343f commit 4f6230e
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ The example code demonstrates how Peroxide can be used to simulate the Lorenz at
use peroxide::fuga::*;

fn main() -> Result<(), Box<dyn Error>> {
let rkf45 = RKF45::new(1e-4, 0.9, 1e-6, 1e-1, 100);
let rkf45 = RKF45::new(1e-4, 0.9, 1e-6, 1e-2, 100);
let basic_ode_solver = BasicODESolver::new(rkf45);
let (_, y_vec) = basic_ode_solver.solve(
&Lorenz,
Expand Down
Binary file modified example_data/lorenz_rkf45.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example_data/rkf45_test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified example_data/test_plot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/lorenz_rkf45.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use peroxide::fuga::*;

#[allow(unused_variables)]
fn main() -> Result<(), Box<dyn Error>> {
let rkf45 = RKF45::new(1e-4, 0.9, 1e-6, 1e-1, 100);
let rkf45 = RKF45::new(1e-4, 0.9, 1e-6, 1e-2, 100);
let basic_ode_solver = BasicODESolver::new(rkf45);
let (_, y_vec) = basic_ode_solver.solve(
&Lorenz,
Expand Down
3 changes: 2 additions & 1 deletion src/util/plot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@
//! let y1 = x.fmap(|t| t.powi(2));
//! let y2 = x.fmap(|t| t.powi(3));
//!
//! let mut rng = SmallRng::seed_from_u64(42);
//! let normal = Normal(0f64, 0.1);
//! let eps = normal.sample(100);
//! let eps = normal.sample_with_rng(&mut rng, x.len());
//! let y3 = y2.add_v(&eps);
//!
//! let mut plt = Plot2D::new();
Expand Down

0 comments on commit 4f6230e

Please sign in to comment.