Back to Eqiora docs Skip to main content

ImplicitTimeSystem

Trait ImplicitTimeSystem 

pub trait ImplicitTimeSystem {
    // Required methods
    fn dimension(&self) -> usize;
    fn residual(
        &self,
        time: f64,
        state: &[f64],
        derivative: &[f64],
        output: &mut [f64],
    ) -> Result<(), Diagnostic>;
    fn residual_jvp(
        &self,
        time: f64,
        state: &[f64],
        derivative: &[f64],
        state_direction: &[f64],
        derivative_direction: &[f64],
        output: &mut [f64],
    ) -> Result<(), Diagnostic>;
}
Description

Residual and tangent actions for F(t, y, y_dot) = 0.

This is intentionally distinct from TimeSystem. A residual-native adapter receives both state and derivative values, and its Newton/Krylov iteration forms combinations such as F_y v + alpha F_y_dot v without pretending that a state-dependent or nonlinear derivative term is a constant mass matrix.

Required Methods§

fn dimension(&self) -> usize

Number of state coordinates and residual equations.

fn residual( &self, time: f64, state: &[f64], derivative: &[f64], output: &mut [f64], ) -> Result<(), Diagnostic>

Evaluate the complete implicit residual.

§Errors

Returns a stable diagnostic when the lowered action cannot be evaluated.

fn residual_jvp( &self, time: f64, state: &[f64], derivative: &[f64], state_direction: &[f64], derivative_direction: &[f64], output: &mut [f64], ) -> Result<(), Diagnostic>

Evaluate F_y state_direction + F_y_dot derivative_direction.

§Errors

Returns a stable diagnostic when the lowered tangent action cannot be evaluated.

Implementors§