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 ControlFlag, Solution,
14 interpolate::Interpolation,
15 traits::{CallBackData, Real, State},
16};
17
18// Solout Trait for controlling output of the solver
19mod solout;
20pub use solout::Solout;
21
22// Common Solout Implementations
23mod default;
24pub use default::DefaultSolout;
25
26mod even;
27pub use even::EvenSolout;
28
29mod dense;
30pub use dense::DenseSolout;
31
32mod t_eval;
33pub use t_eval::TEvalSolout;
34
35// Crossing Detecting Solouts
36
37/// Defines the direction of threshold crossing to detect.
38#[derive(Debug, Clone, Copy, PartialEq, Eq)]
39pub enum CrossingDirection {
40 /// Detect crossings in both directions
41 Both,
42 /// Detect only crossings from below to above the threshold (positive direction)
43 Positive,
44 /// Detect only crossings from above to below the threshold (negative direction)
45 Negative,
46}
47
48// Crossing detection solout
49mod crossing;
50pub use crossing::CrossingSolout;
51
52// Hyperplane crossing detection solout
53mod hyperplane;
54pub use hyperplane::HyperplaneCrossingSolout;