Skip to main content

SpdeSystem

Trait SpdeSystem 

Source
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§

Source

fn drift(&self, t: S, u: &[S], du: &mut [S], grid: &Grid1D<S>)

Evaluate the deterministic spatial operator L[u].

§Arguments
  • t - Current time
  • u - Field values at grid points (interior points only)
  • du - Output: L[u] at each grid point
  • grid - Spatial grid
Source

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 time
  • u - Field values at grid points
  • sigma - Output: σ(u) at each grid point
  • grid - Spatial grid

Provided Methods§

Source

fn dim(&self) -> usize

Spatial dimension (1D, 2D, etc.)

Source

fn noise_correlation(&self) -> NoiseCorrelation<S>

Noise correlation structure.

Source

fn is_additive(&self) -> bool

Whether the noise is additive (σ independent of u).

Implementors§