pub trait ExplicitDynamicsCoupled<X, Y, UX, UV, UA, UY, UR, T = Time>where
Self: Debug,
X: Differentiable<T> + Tensor,
Derivative<X, T>: Differentiable<T> + Tensor,
Y: Differentiable<T> + Tensor,
UX: TensorVec<Item = X>,
UV: TensorVec<Item = Derivative<X, T>>,
UA: TensorVec<Item = Derivative<Derivative<X, T>, T>>,
UY: TensorVec<Item = Y>,
UR: TensorVec<Item = Derivative<Y, T>>,{
// Required methods
fn integrate_coupled(
&self,
function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>, &Y) -> Result<(Derivative<Derivative<X, T>, T>, Derivative<Y, T>), String>,
time: &[Quantity<T>],
initial_position: X,
initial_velocity: Derivative<X, T>,
initial_state: Y,
) -> Result<(Times<T>, UX, UV, UA, UY, UR), IntegrationError>;
fn integrate_coupled_bounded(
&self,
function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>, &Y) -> Result<(Derivative<Derivative<X, T>, T>, Derivative<Y, T>), String>,
bound: impl FnMut(Quantity<T>, &X, &Derivative<X, T>, &Y) -> Result<Spectrum<T>, String>,
safety: Scalar,
time: &[Quantity<T>],
initial_position: X,
initial_velocity: Derivative<X, T>,
initial_state: Y,
) -> Result<(Times<T>, UX, UV, UA, UY, UR), IntegrationError>;
}Expand description
Explicit integrators for dynamics coupled to a first-order state.
\ddot{x} = a(t, x, \dot{x}, y),\quad \dot{y} = f(t, x, \dot{x}, y)Required Methods§
Sourcefn integrate_coupled(
&self,
function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>, &Y) -> Result<(Derivative<Derivative<X, T>, T>, Derivative<Y, T>), String>,
time: &[Quantity<T>],
initial_position: X,
initial_velocity: Derivative<X, T>,
initial_state: Y,
) -> Result<(Times<T>, UX, UV, UA, UY, UR), IntegrationError>
fn integrate_coupled( &self, function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>, &Y) -> Result<(Derivative<Derivative<X, T>, T>, Derivative<Y, T>), String>, time: &[Quantity<T>], initial_position: X, initial_velocity: Derivative<X, T>, initial_state: Y, ) -> Result<(Times<T>, UX, UV, UA, UY, UR), IntegrationError>
Solves an initial value problem for dynamics coupled to a first-order state, given the acceleration and the rate of the state as a function of time, position, velocity, and state.
The solution contains the positions, velocities, accelerations, states, and rates of the
states at each time. The time step is that of the integrator when time holds only the
initial and final times, and otherwise time is the sequence of steps.
Sourcefn integrate_coupled_bounded(
&self,
function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>, &Y) -> Result<(Derivative<Derivative<X, T>, T>, Derivative<Y, T>), String>,
bound: impl FnMut(Quantity<T>, &X, &Derivative<X, T>, &Y) -> Result<Spectrum<T>, String>,
safety: Scalar,
time: &[Quantity<T>],
initial_position: X,
initial_velocity: Derivative<X, T>,
initial_state: Y,
) -> Result<(Times<T>, UX, UV, UA, UY, UR), IntegrationError>
fn integrate_coupled_bounded( &self, function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>, &Y) -> Result<(Derivative<Derivative<X, T>, T>, Derivative<Y, T>), String>, bound: impl FnMut(Quantity<T>, &X, &Derivative<X, T>, &Y) -> Result<Spectrum<T>, String>, safety: Scalar, time: &[Quantity<T>], initial_position: X, initial_velocity: Derivative<X, T>, initial_state: Y, ) -> Result<(Times<T>, UX, UV, UA, UY, UR), IntegrationError>
Solves an initial value problem like integrate_coupled, subject to a
stability bound.
At each step, bound reports the spectrum of the coupled system at the current state,
which is real for diffusion, imaginary for waves, and otherwise complex. The time step
may use at most the fraction safety of the stability limit, where safety is in
$(0, 1]$. A time step above it is an error.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".