Struct nyx_space::propagators::PropInstance

source ·
pub struct PropInstance<'a, D: Dynamics, E: ErrorCtrl>{
    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>

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, PropagationError>

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, PropagationError>

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, PropagationError>

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, PropagationError>

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>), PropagationError>

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.

source

pub fn until_epoch_with_traj( &mut self, end_time: Epoch ) -> Result<(D::StateType, Traj<D::StateType>), PropagationError>

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>), PropagationError>

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>), PropagationError>

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<(), PropagationError>

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

source

pub fn latest_details(&self) -> IntegrationDetails

Copy the details of the latest integration step.

Auto Trait Implementations§

§

impl<'a, D, E> Freeze for PropInstance<'a, D, E>

§

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 T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

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

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.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> Pointable for T

§

const ALIGN: usize = _

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 for T

§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where 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 T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
§

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

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,