#[repr(C)]pub struct RungeKutta4Static {
pub state: [f64; 4],
pub dt: f64,
pub t: f64,
pub config: SolverConfig,
pub solver_state: SolverState,
}Expand description
Runge-Kutta 4th order ODE solver with fixed memory footprint
Fields§
§state: [f64; 4]Current state vector (fixed size)
dt: f64Time step size
t: f64Current time
config: SolverConfigSolver configuration
solver_state: SolverStateSolver state
Implementations§
Source§impl RungeKutta4Static
impl RungeKutta4Static
Sourcepub fn new(dt: f64, config: SolverConfig) -> Self
pub fn new(dt: f64, config: SolverConfig) -> Self
Create new RK4 solver
Sourcepub fn integrate<F>(
&mut self,
f: &F,
t0: f64,
y0: [f64; 4],
t_final: f64,
) -> SolverResult<ODEState>where
F: ODEFunction,
pub fn integrate<F>(
&mut self,
f: &F,
t0: f64,
y0: [f64; 4],
t_final: f64,
) -> SolverResult<ODEState>where
F: ODEFunction,
Integrate ODE from t0 to t_final
Sourcepub fn integrate_until_steady_state<F>(
&mut self,
f: &F,
t0: f64,
y0: [f64; 4],
t_limit: f64,
) -> SolverResult<ODEState>where
F: ODEFunction,
pub fn integrate_until_steady_state<F>(
&mut self,
f: &F,
t0: f64,
y0: [f64; 4],
t_limit: f64,
) -> SolverResult<ODEState>where
F: ODEFunction,
Integrate until the derivative infinity norm is below the configured
tolerance. Unlike Self::integrate, this operation is explicitly a
steady-state search and may terminate before t_limit.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RungeKutta4Static
impl RefUnwindSafe for RungeKutta4Static
impl Send for RungeKutta4Static
impl Sync for RungeKutta4Static
impl Unpin for RungeKutta4Static
impl UnsafeUnpin for RungeKutta4Static
impl UnwindSafe for RungeKutta4Static
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.