pub struct PropInstance<'a, D: Dynamics, E: ErrorCtrl>where
    DefaultAllocator: Allocator<f64, <D::StateType as State>::Size> + Allocator<f64, <D::StateType as State>::Size, <D::StateType as State>::Size> + Allocator<usize, <D::StateType as State>::Size, <D::StateType as State>::Size> + Allocator<f64, <D::StateType as State>::VecLength>,{
    pub state: D::StateType,
    pub prop: &'a Propagator<'a, D, E>,
    pub details: IntegrationDetails,
    /* private fields */
}
Expand description

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§

§state: D::StateType

The state of this propagator instance

§prop: &'a Propagator<'a, D, E>

The propagator setup (kind, stages, etc.)

§details: IntegrationDetails

Stores the details of the previous integration step

Implementations§

source§

impl<'a, D: Dynamics, E: ErrorCtrl> PropInstance<'a, D, E>where DefaultAllocator: Allocator<f64, <D::StateType as State>::Size> + Allocator<f64, <D::StateType as State>::Size, <D::StateType as State>::Size> + Allocator<usize, <D::StateType as State>::Size, <D::StateType as State>::Size> + Allocator<f64, <D::StateType as State>::VecLength>,

source

pub fn set_step(&mut self, step_size: Duration, fixed: bool)

Allows setting the step size of the propagator

source

pub fn for_duration( &mut self, duration: Duration ) -> Result<D::StateType, NyxError>

This method propagates the provided Dynamics for the provided duration.

source

pub fn for_duration_with_channel( &mut self, duration: Duration, tx_chan: Sender<D::StateType> ) -> Result<D::StateType, NyxError>

This method propagates the provided Dynamics for the provided duration and publishes each state on the channel.

source

pub fn until_epoch(&mut self, end_time: Epoch) -> Result<D::StateType, NyxError>

Propagates the provided Dynamics until the provided epoch. Returns the end state.

source

pub fn until_epoch_with_channel( &mut self, end_time: Epoch, tx_chan: Sender<D::StateType> ) -> Result<D::StateType, NyxError>

Propagates the provided Dynamics until the provided epoch and publishes states on the provided channel. Returns the end state.

source

pub fn for_duration_with_traj( &mut self, duration: Duration ) -> Result<(D::StateType, Traj<D::StateType>), NyxError>where <DefaultAllocator as Allocator<f64, <D::StateType as State>::VecLength>>::Buffer: Send, D::StateType: InterpState,

Propagates the provided Dynamics for the provided duration and generate the trajectory of these dynamics on its own thread. Returns the end state and the trajectory. Known bug #190: Cannot generate a valid trajectory when propagating backward

source

pub fn until_epoch_with_traj( &mut self, end_time: Epoch ) -> Result<(D::StateType, Traj<D::StateType>), NyxError>where <DefaultAllocator as Allocator<f64, <D::StateType as State>::VecLength>>::Buffer: Send, D::StateType: InterpState,

Propagates the provided Dynamics until the provided epoch and generate the trajectory of these dynamics on its own thread. Returns the end state and the trajectory. Known bug #190: Cannot generate a valid trajectory when propagating backward

source

pub fn until_event<F: EventEvaluator<D::StateType>>( &mut self, max_duration: Duration, event: &F ) -> Result<(D::StateType, Traj<D::StateType>), NyxError>where <DefaultAllocator as Allocator<f64, <D::StateType as State>::VecLength>>::Buffer: Send, D::StateType: InterpState,

Propagate until a specific event is found once. Returns the state found and the trajectory until max_duration

source

pub fn until_nth_event<F: EventEvaluator<D::StateType>>( &mut self, max_duration: Duration, event: &F, trigger: usize ) -> Result<(D::StateType, Traj<D::StateType>), NyxError>where <DefaultAllocator as Allocator<f64, <D::StateType as State>::VecLength>>::Buffer: Send, D::StateType: InterpState,

Propagate until a specific event is found trigger times. Returns the state found and the trajectory until max_duration

source

pub fn single_step(&mut self) -> Result<(), NyxError>

Take a single propagator step and emit the result on the TX channel (if enabled)

source

pub fn latest_details(&self) -> &IntegrationDetails

Borrow the details of the latest integration step.

Trait Implementations§

source§

impl<'a, D: Debug + Dynamics, E: Debug + ErrorCtrl> Debug for PropInstance<'a, D, E>where DefaultAllocator: Allocator<f64, <D::StateType as State>::Size> + Allocator<f64, <D::StateType as State>::Size, <D::StateType as State>::Size> + Allocator<usize, <D::StateType as State>::Size, <D::StateType as State>::Size> + Allocator<f64, <D::StateType as State>::VecLength>, D::StateType: Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, D, E> !RefUnwindSafe for PropInstance<'a, D, E>

§

impl<'a, D, E> !Send for PropInstance<'a, D, E>

§

impl<'a, D, E> !Sync for PropInstance<'a, D, E>

§

impl<'a, D, E> !Unpin for PropInstance<'a, D, E>

§

impl<'a, D, E> !UnwindSafe for PropInstance<'a, D, E>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
§

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

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V