[][src]Struct nyx_space::propagators::Propagator

pub struct Propagator<'a, M: Dynamics, E: ErrorCtrl> where
    DefaultAllocator: Allocator<f64, M::StateSize>, 
{ pub dynamics: &'a mut M, pub tx_chan: Option<&'a Sender<M::StateType>>, pub event_trackers: EventTrackers<M::StateType>, // some fields omitted }

A Propagator allows propagating a set of dynamics forward or backward in time. It is an EventTracker, without any event tracking. It includes the options, the integrator details of the previous step, and the set of coefficients used for the monomorphic instance.

Fields

dynamics: &'a mut Mtx_chan: Option<&'a Sender<M::StateType>>event_trackers: EventTrackers<M::StateType>

Methods

impl<'a, M: Dynamics, E: ErrorCtrl> Propagator<'a, M, E> where
    DefaultAllocator: Allocator<f64, M::StateSize>, 
[src]

The Propagator trait defines the functions of a propagator and of an event tracker.

pub fn new<T: RK>(dynamics: &'a mut M, opts: &PropOpts<E>) -> Self[src]

Each propagator must be initialized with new which stores propagator information.

pub fn default(dynamics: &'a mut M, opts: &PropOpts<E>) -> Self[src]

Default propagator is an RK89.

pub fn set_step(&mut self, step_size: f64, fixed: bool)[src]

pub fn time(&self) -> f64[src]

Returns the time of the propagation

WARNING: Do not use the dynamics to get the time, it will be the initial value!

pub fn state_vector(&self) -> VectorN<f64, M::StateSize>[src]

Returns the state of the propagation

WARNING: Do not use the dynamics to get the state, it will be the initial value!

pub fn until_time_elapsed(&mut self, elapsed_time: f64) -> M::StateType[src]

This method propagates the provided Dynamics dyn for elapsed_time seconds. WARNING: This function has many caveats (please read detailed docs).

IMPORTANT CAVEAT of until_time_elapsed

  • It is assumed that self.dynamics.time() returns a time in the same units as elapsed_time.

pub fn until_event(
    &mut self,
    condition: StopCondition<M::StateType>
) -> Result<M::StateType, ConvergenceError>
[src]

pub fn derive(
    &mut self,
    t: f64,
    state: &VectorN<f64, M::StateSize>
) -> (f64, VectorN<f64, M::StateSize>)
[src]

This method integrates whichever function is provided as d_xdt.

The derive method is monomorphic to increase speed. This function takes a time t and a current state state then derives the dynamics at that time (i.e. propagates for one time step). The d_xdt parameter is the derivative function which take a time t of type f64 and a reference to a state of type VectorN<f64, N>, and returns the result as VectorN<f64, N> of the derivative. The reference should preferrably only be borrowed. This function returns the next time (i.e. the previous time incremented by the timestep used) and the new state as y_{n+1} = y_n + \frac{dy_n}{dt}. To get the integration details, check Self.latest_details. Note: using VectorN<f64, N> instead of DVector implies that the function must always return a vector of the same size. This static allocation allows for high execution speeds.

pub fn latest_details(&self) -> &IntegrationDetails[src]

Borrow the details of the latest integration step.

Trait Implementations

impl<'a, M: Debug + Dynamics, E: Debug + ErrorCtrl> Debug for Propagator<'a, M, E> where
    DefaultAllocator: Allocator<f64, M::StateSize>,
    M::StateType: Debug,
    M::StateType: Debug
[src]

Auto Trait Implementations

impl<'a, M, E> !RefUnwindSafe for Propagator<'a, M, E>

impl<'a, M, E> !Send for Propagator<'a, M, E>

impl<'a, M, E> !Sync for Propagator<'a, M, E>

impl<'a, M, E> Unpin for Propagator<'a, M, E> where
    E: Unpin,
    <M as Dynamics>::StateType: Unpin

impl<'a, M, E> !UnwindSafe for Propagator<'a, M, E>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,