Skip to main content

Integrator

Trait Integrator 

Source
pub trait Integrator {
    // Required methods
    fn step(
        &self,
        state: &mut SimState,
        force_field: &dyn ForceField,
        dt: f64,
    ) -> SimResult<()>;
    fn error_order(&self) -> u32;
    fn is_symplectic(&self) -> bool;
}
Expand description

Numerical integrator trait.

Required Methods§

Source

fn step( &self, state: &mut SimState, force_field: &dyn ForceField, dt: f64, ) -> SimResult<()>

Step the state forward by one timestep.

§Errors

Returns error if integration fails.

Source

fn error_order(&self) -> u32

Get the error order of this integrator.

Source

fn is_symplectic(&self) -> bool

Check if integrator is symplectic (preserves phase space volume).

Implementors§