pub trait SpdeSystem<S: Scalar> {
// Required methods
fn drift(&self, t: S, u: &[S], du: &mut [S], grid: &Grid1D<S>);
fn diffusion(&self, t: S, u: &[S], sigma: &mut [S], grid: &Grid1D<S>);
// Provided methods
fn dim(&self) -> usize { ... }
fn noise_correlation(&self) -> NoiseCorrelation<S> { ... }
fn is_additive(&self) -> bool { ... }
}Expand description
Trait for Stochastic Partial Differential Equation systems.
An SPDE has the form:
∂u/∂t = L[u] + σ(u) ξ(x,t)where L is a spatial differential operator and ξ is space-time noise.
Required Methods§
Sourcefn drift(&self, t: S, u: &[S], du: &mut [S], grid: &Grid1D<S>)
fn drift(&self, t: S, u: &[S], du: &mut [S], grid: &Grid1D<S>)
Evaluate the deterministic spatial operator L[u].
§Arguments
t- Current timeu- Field values at grid points (interior points only)du- Output:L[u]at each grid pointgrid- Spatial grid
Sourcefn diffusion(&self, t: S, u: &[S], sigma: &mut [S], grid: &Grid1D<S>)
fn diffusion(&self, t: S, u: &[S], sigma: &mut [S], grid: &Grid1D<S>)
Evaluate the noise coefficient σ(u).
For additive noise, this is independent of u. For multiplicative noise, this depends on u.
§Arguments
t- Current timeu- Field values at grid pointssigma- Output: σ(u) at each grid pointgrid- Spatial grid
Provided Methods§
Sourcefn noise_correlation(&self) -> NoiseCorrelation<S>
fn noise_correlation(&self) -> NoiseCorrelation<S>
Noise correlation structure.
Sourcefn is_additive(&self) -> bool
fn is_additive(&self) -> bool
Whether the noise is additive (σ independent of u).