Skip to main content

PronySystem

Trait PronySystem 

Source
pub trait PronySystem<S: Scalar> {
    // Required methods
    fn dim(&self) -> usize;
    fn rhs(&self, t: S, y: &[S], f: &mut [S]);
    fn kernel(&self) -> &PronyKernel<S>;

    // Provided method
    fn coupling(&self) -> Option<Vec<Vec<S>>> { ... }
}
Expand description

System for Prony solver: y’ = f(t, y) + Σᵢ Iᵢ.

The kernel is implicitly defined by the Prony series.

Required Methods§

Source

fn dim(&self) -> usize

Dimension of the state space.

Source

fn rhs(&self, t: S, y: &[S], f: &mut [S])

Evaluate the local right-hand side f(t, y).

Source

fn kernel(&self) -> &PronyKernel<S>

Get the Prony kernel for computing memory effects.

Provided Methods§

Source

fn coupling(&self) -> Option<Vec<Vec<S>>>

Optional coupling matrix: how each kernel term affects the state.

By default, assumes kernel affects all components equally: I(t) * y(t). For more complex coupling, override this method.

Returns: coupling[i][k] = coefficient for how I_k affects dy_i/dt

Implementors§