pub trait ExplicitDynamics<X, UX, UV, UA, T = Time>where
Self: Debug,
X: Differentiable<T> + Tensor,
Derivative<X, T>: Differentiable<T> + Tensor,
UX: TensorVec<Item = X>,
UV: TensorVec<Item = Derivative<X, T>>,
UA: TensorVec<Item = Derivative<Derivative<X, T>, T>>,{
// Required methods
fn integrate(
&self,
function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>) -> Result<Derivative<Derivative<X, T>, T>, String>,
time: &[Quantity<T>],
initial_position: X,
initial_velocity: Derivative<X, T>,
) -> Result<(Times<T>, UX, UV, UA), IntegrationError>;
fn integrate_bounded(
&self,
function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>) -> Result<Derivative<Derivative<X, T>, T>, String>,
bound: impl FnMut(Quantity<T>, &X, &Derivative<X, T>) -> Result<Quantity<T>, String>,
safety: Scalar,
time: &[Quantity<T>],
initial_position: X,
initial_velocity: Derivative<X, T>,
) -> Result<(Times<T>, UX, UV, UA), IntegrationError>;
}Expand description
Explicit integrators for dynamics.
\ddot{x} = a(t, x, \dot{x})Required Methods§
Sourcefn integrate(
&self,
function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>) -> Result<Derivative<Derivative<X, T>, T>, String>,
time: &[Quantity<T>],
initial_position: X,
initial_velocity: Derivative<X, T>,
) -> Result<(Times<T>, UX, UV, UA), IntegrationError>
fn integrate( &self, function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>) -> Result<Derivative<Derivative<X, T>, T>, String>, time: &[Quantity<T>], initial_position: X, initial_velocity: Derivative<X, T>, ) -> Result<(Times<T>, UX, UV, UA), IntegrationError>
Solves an initial value problem for dynamics, given the acceleration as a function of time, position, and velocity.
The solution contains the positions, velocities, and accelerations 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_bounded(
&self,
function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>) -> Result<Derivative<Derivative<X, T>, T>, String>,
bound: impl FnMut(Quantity<T>, &X, &Derivative<X, T>) -> Result<Quantity<T>, String>,
safety: Scalar,
time: &[Quantity<T>],
initial_position: X,
initial_velocity: Derivative<X, T>,
) -> Result<(Times<T>, UX, UV, UA), IntegrationError>
fn integrate_bounded( &self, function: impl FnMut(Quantity<T>, &X, &Derivative<X, T>) -> Result<Derivative<Derivative<X, T>, T>, String>, bound: impl FnMut(Quantity<T>, &X, &Derivative<X, T>) -> Result<Quantity<T>, String>, safety: Scalar, time: &[Quantity<T>], initial_position: X, initial_velocity: Derivative<X, T>, ) -> Result<(Times<T>, UX, UV, UA), IntegrationError>
Solves an initial value problem like integrate, subject to a stability bound.
At each step, bound reports the fastest time scale of the system at the current state, the reciprocal of its highest angular frequency. The stability limit is that time scale times the extent of the method’s stability region. The time step may use at most the fraction safety of that 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".