pub trait EllipticProblem<const N: usize> {
// Required methods
fn dimension_kind(&self, dim: usize) -> DimensionKind;
fn transport(
&self,
state: &[f64; N],
derivs: &StateDerivatives<N>,
) -> Transport<N>;
fn rhs(&self, state: &[f64; N]) -> f64;
fn boundary_conditions(&self) -> BoundaryConditions<N>;
// Provided method
fn reaction(&self, _state: &[f64; N]) -> f64 { ... }
}Expand description
A stationary finite-difference problem -T u + reaction * u = f on a grid.
The operator is written as
-T u + reaction * u = fwhere T u is the transport term built from Transport. The negative
sign follows the standard elliptic convention: for a diffusion coefficient
D, T u = D u'' and the problem reads -D u'' + rho u = f. The transport
source is not used; use EllipticProblem::rhs for the forcing f and
EllipticProblem::reaction for the local diagonal coefficient.
Required Methods§
Sourcefn dimension_kind(&self, dim: usize) -> DimensionKind
fn dimension_kind(&self, dim: usize) -> DimensionKind
Discretization kind for dim.
Sourcefn transport(
&self,
state: &[f64; N],
derivs: &StateDerivatives<N>,
) -> Transport<N>
fn transport( &self, state: &[f64; N], derivs: &StateDerivatives<N>, ) -> Transport<N>
Transport coefficients for the current field u and derivatives.
The returned source is ignored by the elliptic assembler.
Sourcefn boundary_conditions(&self) -> BoundaryConditions<N>
fn boundary_conditions(&self) -> BoundaryConditions<N>
Boundary conditions for each dimension.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".