ExactSolution

Trait ExactSolution 

Source
pub trait ExactSolution<F: IntegrateFloat> {
    // Required methods
    fn evaluate(&self, coordinates: &[F]) -> F;
    fn derivative(&self, coordinates: &[F], variable: usize) -> F;
    fn second_derivative(&self, coordinates: &[F], variable: usize) -> F;
    fn dimension(&self) -> usize;

    // Provided method
    fn mixed_derivative(&self, coordinates: &[F], var1: usize, var2: usize) -> F { ... }
}
Expand description

Trait for exact solutions in MMS problems

Required Methods§

Source

fn evaluate(&self, coordinates: &[F]) -> F

Evaluate the exact solution at given point(s)

Source

fn derivative(&self, coordinates: &[F], variable: usize) -> F

Evaluate the first derivative with respect to specified variable

Source

fn second_derivative(&self, coordinates: &[F], variable: usize) -> F

Evaluate the second derivative with respect to specified variable

Source

fn dimension(&self) -> usize

Get the dimensionality of the problem

Provided Methods§

Source

fn mixed_derivative(&self, coordinates: &[F], var1: usize, var2: usize) -> F

Evaluate mixed partial derivatives (for PDEs)

Implementors§