differential_equations/solout/mod.rs
1//! Solout trait and common implementations for controlling the output of differential equation solvers.
2//!
3//! ## Includes
4//! * `DefaultSolout` for capturing all solver steps
5//! * `EvenSolout` for capturing evenly spaced solution points
6//! * `DenseSolout` for capturing a dense set of interpolated points
7//! * `TEvalSolout` for capturing points based on a user-defined function
8//! * `CrossingSolout` for capturing points when crossing a specified value
9//! * `HyperplaneCrossingSolout` for capturing points when crossing a hyperplane
10//!
11
12use crate::{
13 control::ControlFlag,
14 interpolate::Interpolation,
15 solution::Solution,
16 traits::{CallBackData, Real, State},
17};
18
19mod crossing;
20mod default;
21mod dense;
22mod even;
23mod hyperplane;
24mod solout;
25mod t_eval;
26
27pub use crossing::CrossingSolout;
28pub use default::DefaultSolout;
29pub use dense::DenseSolout;
30pub use even::EvenSolout;
31pub use hyperplane::HyperplaneCrossingSolout;
32pub use solout::Solout;
33pub use t_eval::TEvalSolout;
34
35/// Defines the direction of threshold crossing to detect.
36#[derive(Debug, Clone, Copy, PartialEq, Eq)]
37pub enum CrossingDirection {
38 /// Detect crossings in both directions
39 Both,
40 /// Detect only crossings from below to above the threshold (positive direction)
41 Positive,
42 /// Detect only crossings from above to below the threshold (negative direction)
43 Negative,
44}