Struct nyx_space::propagators::PropInstance
source · 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
sourceimpl<'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>,
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>,
sourcepub fn set_step(&mut self, step_size: Duration, fixed: bool)
pub fn set_step(&mut self, step_size: Duration, fixed: bool)
Allows setting the step size of the propagator
sourcepub fn for_duration(
&mut self,
duration: Duration
) -> Result<D::StateType, NyxError>
pub fn for_duration(
&mut self,
duration: Duration
) -> Result<D::StateType, NyxError>
This method propagates the provided Dynamics for the provided duration.
sourcepub fn for_duration_with_channel(
&mut self,
duration: Duration,
tx_chan: Sender<D::StateType>
) -> Result<D::StateType, NyxError>
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.
sourcepub fn until_epoch(&mut self, end_time: Epoch) -> Result<D::StateType, NyxError>
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.
sourcepub fn until_epoch_with_channel(
&mut self,
end_time: Epoch,
tx_chan: Sender<D::StateType>
) -> Result<D::StateType, NyxError>
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.
sourcepub 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,
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
sourcepub 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,
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
sourcepub 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,
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
sourcepub 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,
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
sourcepub fn single_step(&mut self) -> Result<(), NyxError>
pub fn single_step(&mut self) -> Result<(), NyxError>
Take a single propagator step and emit the result on the TX channel (if enabled)
sourcepub fn latest_details(&self) -> &IntegrationDetails
pub fn latest_details(&self) -> &IntegrationDetails
Borrow the details of the latest integration step.
Trait Implementations
sourceimpl<'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,
D::StateType: Debug,
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,
D::StateType: Debug,
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Self
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read morefn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.