pub struct OdeSolver {
pub method: OdeMethod,
pub dt: f64,
pub dt_min: f64,
pub dt_max: f64,
pub tolerance: f64,
pub max_steps: u64,
/* private fields */
}Expand description
ODE solver with configurable method and step control.
Fields§
§method: OdeMethod§dt: f64§dt_min: f64§dt_max: f64§tolerance: f64§max_steps: u64Implementations§
Source§impl OdeSolver
impl OdeSolver
pub fn new(method: OdeMethod, dt: f64) -> Self
pub fn rk4(dt: f64) -> Self
pub fn adaptive(dt: f64, tol: f64) -> Self
pub fn verlet(dt: f64) -> Self
Sourcepub fn step(&mut self, system: &dyn OdeSystem, state: &OdeState) -> OdeState
pub fn step(&mut self, system: &dyn OdeSystem, state: &OdeState) -> OdeState
Integrate one step. Returns the new state.
Auto Trait Implementations§
impl Freeze for OdeSolver
impl RefUnwindSafe for OdeSolver
impl Send for OdeSolver
impl Sync for OdeSolver
impl Unpin for OdeSolver
impl UnsafeUnpin for OdeSolver
impl UnwindSafe for OdeSolver
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.