pub struct FlowMap {
pub dim: usize,
pub dt: f64,
}Expand description
Numerical flow integration for autonomous ODEs ẋ = f(x).
Uses a fixed-step 4th-order Runge–Kutta integrator.
Fields§
§dim: usizeDimension of the state space.
dt: f64Integration step size.
Implementations§
Source§impl FlowMap
impl FlowMap
Sourcepub fn advance<F>(&self, init: &[f64], n_steps: usize, f: &F) -> Vec<f64>
pub fn advance<F>(&self, init: &[f64], n_steps: usize, f: &F) -> Vec<f64>
Advance the state by n_steps using RK4 with the vector field f.
Sourcepub fn trajectory<F>(
&self,
init: &[f64],
n_steps: usize,
f: &F,
) -> Vec<Vec<f64>>
pub fn trajectory<F>( &self, init: &[f64], n_steps: usize, f: &F, ) -> Vec<Vec<f64>>
Generate a trajectory (list of states) of length n_steps + 1.
Sourcepub fn stroboscopic_map<F>(
&self,
init: &[f64],
n_periods: usize,
steps_per_period: usize,
f: &F,
) -> Vec<Vec<f64>>
pub fn stroboscopic_map<F>( &self, init: &[f64], n_periods: usize, steps_per_period: usize, f: &F, ) -> Vec<Vec<f64>>
Stroboscopic map: sample the trajectory at every period steps.
Sourcepub fn fundamental_solution_matrix<F>(
&self,
init: &[f64],
n_steps: usize,
f: &F,
) -> Vec<Vec<f64>>
pub fn fundamental_solution_matrix<F>( &self, init: &[f64], n_steps: usize, f: &F, ) -> Vec<Vec<f64>>
Compute the fundamental solution matrix (monodromy-like) by
propagating dim perturbation vectors alongside the trajectory.
Returns a dim × dim matrix in row-major order (each row is a
transported unit vector).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FlowMap
impl RefUnwindSafe for FlowMap
impl Send for FlowMap
impl Sync for FlowMap
impl Unpin for FlowMap
impl UnsafeUnpin for FlowMap
impl UnwindSafe for FlowMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.