pub struct VerletIntegrator;Expand description
Störmer-Verlet symplectic integrator.
Second-order, symplectic method with excellent energy conservation. Error is O(h²) but energy oscillates around true value without drift.
Algorithm:
q_{n+1/2} = q_n + (h/2) * v_n
v_{n+1} = v_n + h * a(q_{n+1/2})
q_{n+1} = q_{n+1/2} + (h/2) * v_{n+1}Implementations§
Trait Implementations§
Source§impl Clone for VerletIntegrator
impl Clone for VerletIntegrator
Source§fn clone(&self) -> VerletIntegrator
fn clone(&self) -> VerletIntegrator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VerletIntegrator
impl Debug for VerletIntegrator
Source§impl Default for VerletIntegrator
impl Default for VerletIntegrator
Source§fn default() -> VerletIntegrator
fn default() -> VerletIntegrator
Returns the “default value” for a type. Read more
Source§impl Integrator for VerletIntegrator
impl Integrator for VerletIntegrator
Source§fn step(
&self,
state: &mut SimState,
force_field: &dyn ForceField,
dt: f64,
) -> SimResult<()>
fn step( &self, state: &mut SimState, force_field: &dyn ForceField, dt: f64, ) -> SimResult<()>
Step the state forward by one timestep. Read more
Source§fn error_order(&self) -> u32
fn error_order(&self) -> u32
Get the error order of this integrator.
Source§fn is_symplectic(&self) -> bool
fn is_symplectic(&self) -> bool
Check if integrator is symplectic (preserves phase space volume).
Auto Trait Implementations§
impl Freeze for VerletIntegrator
impl RefUnwindSafe for VerletIntegrator
impl Send for VerletIntegrator
impl Sync for VerletIntegrator
impl Unpin for VerletIntegrator
impl UnsafeUnpin for VerletIntegrator
impl UnwindSafe for VerletIntegrator
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