pub struct OdeProblem<'a> { /* private fields */ }Expand description
Builder for ODE problems — scipy-like API.
use mathverse_calculus::ode::{OdeProblem, OdeMethod};
// dy/dt = y, y(0) = 1, solve to t=1
let sol = OdeProblem::new(&|_, y| y, (0.0, 1.0), 1.0)
.method(OdeMethod::Rk4)
.steps(100)
.solve()
.unwrap();
let y_final = sol.last().unwrap().1;
assert!((y_final - 1.0_f64.exp()).abs() < 1e-6);Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for OdeProblem<'a>
impl<'a> !Send for OdeProblem<'a>
impl<'a> !Sync for OdeProblem<'a>
impl<'a> !UnwindSafe for OdeProblem<'a>
impl<'a> Freeze for OdeProblem<'a>
impl<'a> Unpin for OdeProblem<'a>
impl<'a> UnsafeUnpin for OdeProblem<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more