diff --git a/Cargo.toml b/Cargo.toml index cd5f0a9a..2bfe75bb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "peroxide" -version = "0.37.3" +version = "0.37.4" authors = ["axect "] edition = "2018" description = "Rust comprehensive scientific computation library contains linear algebra, numerical analysis, statistics and machine learning tools with farmiliar syntax" diff --git a/RELEASES.md b/RELEASES.md index fc18d8a1..a12571a7 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -1,3 +1,7 @@ +# Release 0.37.4 (2024-05-17) + +- Public ODE Integrator fields + # Release 0.37.3 (2024-05-01) - Add Nan/infinite guard to `gauss_kronrod_quadrature` (early exit) ([#59](https://github.com/Axect/Peroxide/pull/59)) (Thanks to [@GComitini](https://github.com/GComitini)) diff --git a/src/numerical/ode.rs b/src/numerical/ode.rs index bac8d15a..73b89f85 100644 --- a/src/numerical/ode.rs +++ b/src/numerical/ode.rs @@ -39,7 +39,14 @@ //! use peroxide::fuga::*; //! //! fn main() -> Result<(), Box> { -//! let rkf = RKF45::new(1e-4, 0.9, 1e-6, 1e-1, 100); +//! // Same as : let rkf = RKF45::new(1e-4, 0.9, 1e-6, 1e-1, 100); +//! let rkf = RKF45 { +//! tol: 1e-6, +//! safety_factor: 0.9, +//! min_step_size: 1e-6, +//! max_step_size: 1e-1, +//! max_step_iter: 100, +//! }; //! let basic_ode_solver = BasicODESolver::new(rkf); //! let (t_vec, y_vec) = basic_ode_solver.solve( //! &Test, @@ -438,11 +445,11 @@ impl ButcherTableau for RK5 { #[derive(Debug, Clone, Copy)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct BS23 { - tol: f64, - safety_factor: f64, - min_step_size: f64, - max_step_size: f64, - max_step_iter: usize, + pub tol: f64, + pub safety_factor: f64, + pub min_step_size: f64, + pub max_step_size: f64, + pub max_step_iter: usize, } impl Default for BS23 { @@ -492,11 +499,11 @@ impl ButcherTableau for BS23 { #[derive(Debug, Clone, Copy)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct RKF45 { - tol: f64, - safety_factor: f64, - min_step_size: f64, - max_step_size: f64, - max_step_iter: usize, + pub tol: f64, + pub safety_factor: f64, + pub min_step_size: f64, + pub max_step_size: f64, + pub max_step_iter: usize, } impl Default for RKF45 { @@ -558,11 +565,11 @@ impl ButcherTableau for RKF45 { #[derive(Debug, Clone, Copy)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct DP45 { - tol: f64, - safety_factor: f64, - min_step_size: f64, - max_step_size: f64, - max_step_iter: usize, + pub tol: f64, + pub safety_factor: f64, + pub min_step_size: f64, + pub max_step_size: f64, + pub max_step_iter: usize, } impl Default for DP45 { @@ -629,11 +636,11 @@ impl ButcherTableau for DP45 { #[derive(Debug, Clone, Copy)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct TSIT45 { - tol: f64, - safety_factor: f64, - min_step_size: f64, - max_step_size: f64, - max_step_iter: usize, + pub tol: f64, + pub safety_factor: f64, + pub min_step_size: f64, + pub max_step_size: f64, + pub max_step_iter: usize, } impl Default for TSIT45 { @@ -718,9 +725,9 @@ pub enum ImplicitSolver { #[derive(Debug, Clone, Copy)] #[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))] pub struct GL4 { - solver: ImplicitSolver, - tol: f64, - max_step_iter: usize, + pub solver: ImplicitSolver, + pub tol: f64, + pub max_step_iter: usize, } impl Default for GL4 {