Skip to main content

Crate numra_ide

Crate numra_ide 

Source
Expand description

IDE (Integro-Differential Equation) solvers for Numra.

This crate provides methods for solving Volterra integro-differential equations:

y'(t) = f(t, y) + ∫₀ᵗ K(t, s, y(s)) ds

where K is the memory kernel representing history-dependent effects.

§Memory Kernels

The crate supports various kernel types:

  • Exponential kernels: K(t,s) = a * exp(-b*(t-s)), efficient via Prony series
  • Power-law kernels: K(t,s) = (t-s)^(-α), fractional memory
  • Custom kernels: User-defined kernel functions

§Solvers

  • VolterraSolver - General Volterra IDE solver using quadrature
  • PronySolver - Efficient solver for sum-of-exponentials kernels

§Example

use numra_ide::{IdeSystem, VolterraSolver, IdeSolver, IdeOptions, Kernel};
use numra_ide::kernels::ExponentialKernel;

// Viscoelastic material: y' = -k*y + ∫ K(t-s)*y(s) ds
struct Viscoelastic {
    k: f64,
    kernel: ExponentialKernel<f64>,
}

impl IdeSystem<f64> for Viscoelastic {
    fn dim(&self) -> usize { 1 }

    fn rhs(&self, _t: f64, y: &[f64], f: &mut [f64]) {
        f[0] = -self.k * y[0];
    }

    fn kernel(&self, t: f64, s: f64, y: &[f64], k: &mut [f64]) {
        k[0] = self.kernel.evaluate(t - s) * y[0];
    }
}

Author: Moussa Leblouba Date: 2 February 2026 Modified: 2 May 2026

Re-exports§

pub use kernels::ExponentialKernel;
pub use kernels::Kernel;
pub use kernels::PowerLawKernel;
pub use kernels::PronyKernel;
pub use prony::PronySolver;
pub use prony::PronySystem;

Modules§

kernels
Memory kernels for integro-differential equations.
prony
Prony series (Sum of Exponentials) solver for IDEs.

Structs§

IdeOptions
Options for IDE solvers.
IdeResult
Result of IDE integration.
IdeStats
Statistics from IDE solver.
VolterraRK4Solver
Improved Volterra solver using 4th-order Runge-Kutta for time-stepping.
VolterraSolver
Volterra IDE solver using quadrature for the memory integral.

Traits§

IdeSolver
Trait for IDE solvers.
IdeSystem
Trait for integro-differential equation systems.
Scalar
A real scalar type suitable for numerical computation.