Trait for defining an ODE problem. Implement this trait to define your own ODE problem. # Example ``` use peroxide::fuga::*; struct MyODEProblem; impl ODEProblem for MyODEProblem { fn rhs(&self, t: f64, y: &[f64], dy: &mut [f64]) -> anyhow::Result<()> { dy[0] = -0.5 * y[0]; dy[1] = y[0] - y[1]; Ok(()) } } ```
| 111 | /// } |
| 112 | /// ``` |
| 113 | pub trait ODEProblem { |
| 114 | fn rhs(&self, t: f64, y: &[f64], dy: &mut [f64]) -> Result<()>; |
| 115 | } |
| 116 | |
| 117 | /// Trait for ODE integrators. |
| 118 | /// |
nothing calls this directly
no outgoing calls
no test coverage detected