1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Clippy: numerical code uses index-heavy loops and literals from references.
//! FDE (Fractional Differential Equation) solvers for Numra.
//!
//! This crate provides methods for solving fractional differential equations
//! using the Caputo derivative:
//!
//! ```text
//! D^α y(t) = f(t, y), y(0) = y₀
//! ```
//!
//! where D^α is the Caputo fractional derivative of order α ∈ (0, 1].
//!
//! # The Caputo Derivative
//!
//! The Caputo fractional derivative of order α is defined as:
//!
//! ```text
//! D^α y(t) = (1/Γ(1-α)) ∫₀ᵗ (t-s)^(-α) y'(s) ds
//! ```
//!
//! Key properties:
//! - Reduces to ordinary derivative when α = 1
//! - D^α c = 0 for constants (unlike Riemann-Liouville)
//! - Has "memory" - depends on full history of y
//!
//! # Solvers
//!
//! - [`L1Solver`] - L1 scheme for Caputo derivative (order 2-α accuracy)
//!
//! # Example
//!
//! ```
//! use numra_fde::{FdeSystem, L1Solver, FdeSolver, FdeOptions};
//!
//! // Fractional relaxation: D^α y = -λy, y(0) = 1
//! struct FractionalRelaxation { lambda: f64 }
//!
//! impl FdeSystem<f64> for FractionalRelaxation {
//! fn dim(&self) -> usize { 1 }
//! fn alpha(&self) -> f64 { 0.5 } // Half-order derivative
//! fn rhs(&self, _t: f64, y: &[f64], f: &mut [f64]) {
//! f[0] = -self.lambda * y[0];
//! }
//! }
//!
//! let system = FractionalRelaxation { lambda: 1.0 };
//! let opts = FdeOptions::default().dt(0.01);
//! let result = L1Solver::solve(&system, 0.0, 1.0, &[1.0], &opts);
//! ```
//!
//! Author: Moussa Leblouba
//! Date: 2 February 2026
//! Modified: 2 May 2026
pub use Scalar;
pub use ;
pub use L1Solver;
pub use ;