Struct nyx_space::propagators::Propagator
source · pub struct Propagator<'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 dynamics: D,
pub opts: PropOpts<E>,
/* 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
dynamics: D
opts: PropOpts<E>
Implementations
sourceimpl<'a, D: Dynamics, E: ErrorCtrl> Propagator<'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> Propagator<'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>,
The Propagator
trait defines the functions of a propagator and of an event tracker.
sourcepub fn new<T: RK>(dynamics: D, opts: PropOpts<E>) -> Self
pub fn new<T: RK>(dynamics: D, opts: PropOpts<E>) -> Self
Each propagator must be initialized with new
which stores propagator information.
sourcepub fn set_tolerance(&mut self, tol: f64)
pub fn set_tolerance(&mut self, tol: f64)
Set the tolerance for the propagator
sourcepub fn set_max_step(&mut self, step: Duration)
pub fn set_max_step(&mut self, step: Duration)
Set the maximum step size for the propagator and sets the initial step to that value if currently greater
pub fn set_min_step(&mut self, step: Duration)
sourcepub fn rk89(dynamics: D, opts: PropOpts<E>) -> Self
pub fn rk89(dynamics: D, opts: PropOpts<E>) -> Self
An RK89 propagator (the default) with custom propagator options.
sourcepub fn dp78(dynamics: D, opts: PropOpts<E>) -> Self
pub fn dp78(dynamics: D, opts: PropOpts<E>) -> Self
A Dormand Prince 7-8 propagator with custom propagator options: it’s about 20% faster than an RK98, and more stable in two body dynamics. WARNINGS: Dormand Prince may have issues with generating proper trajectories, leading to glitches in event finding.
pub fn with(&'a self, state: D::StateType) -> PropInstance<'a, D, E>
sourceimpl<'a, D: Dynamics> Propagator<'a, D, RSSCartesianStep>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> Propagator<'a, D, RSSCartesianStep>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 default_dp78(dynamics: D) -> Self
pub fn default_dp78(dynamics: D) -> Self
A default Dormand Prince 78 propagator with the default PropOpts.
Faster and more stable than an RK89 (default
) but seems to cause issues for event finding.
WARNINGS: Dormand Prince may have issues with generating proper trajectories, leading to glitches in event finding.
Trait Implementations
sourceimpl<'a, D: Clone + Dynamics, E: Clone + ErrorCtrl> Clone for Propagator<'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: Clone + Dynamics, E: Clone + ErrorCtrl> Clone for Propagator<'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>,
sourcefn clone(&self) -> Propagator<'a, D, E>
fn clone(&self) -> Propagator<'a, D, E>
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl<'a, D: Debug + Dynamics, E: Debug + ErrorCtrl> Debug for Propagator<'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: Debug + Dynamics, E: Debug + ErrorCtrl> Debug for Propagator<'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>,
Auto Trait Implementations
impl<'a, D, E> RefUnwindSafe for Propagator<'a, D, E>where
D: RefUnwindSafe,
E: RefUnwindSafe,
impl<'a, D, E> Send for Propagator<'a, D, E>
impl<'a, D, E> Sync for Propagator<'a, D, E>
impl<'a, D, E> Unpin for Propagator<'a, D, E>where
D: Unpin,
E: Unpin,
impl<'a, D, E> UnwindSafe for Propagator<'a, D, E>where
D: UnwindSafe,
E: UnwindSafe,
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.