Trait salva2d::kernel::Kernel

source ·
pub trait Kernel: Send + Sync {
    // Required methods
    fn scalar_apply(r: Real, h: Real) -> Real;
    fn scalar_apply_diff(r: Real, h: Real) -> Real;

    // Provided methods
    fn apply(v: Vector<Real>, h: Real) -> Real { ... }
    fn apply_diff(v: Vector<Real>, h: Real) -> Vector<Real> { ... }
    fn points_apply(p1: &Point<Real>, p2: &Point<Real>, h: Real) -> Real { ... }
    fn points_apply_diff1(
        p1: &Point<Real>,
        p2: &Point<Real>,
        h: Real
    ) -> Vector<Real> { ... }
    fn points_apply_diff2(
        p1: &Point<Real>,
        p2: &Point<Real>,
        h: Real
    ) -> Vector<Real> { ... }
}
Expand description

Kernel functions for performing approximations within the PBF/SPH methods.

Required Methods§

source

fn scalar_apply(r: Real, h: Real) -> Real

Evaluates the kernel for the given scalar r and the reference support length h.

source

fn scalar_apply_diff(r: Real, h: Real) -> Real

Evaluates the kernel derivative for the given scalar r and the reference support length h.

Provided Methods§

source

fn apply(v: Vector<Real>, h: Real) -> Real

Evaluate the kernel for the given vector.

source

fn apply_diff(v: Vector<Real>, h: Real) -> Vector<Real>

Differential wrt. the coordinates of v.

source

fn points_apply(p1: &Point<Real>, p2: &Point<Real>, h: Real) -> Real

Evaluate the kernel for the vector equal to p1 - p2.

source

fn points_apply_diff1( p1: &Point<Real>, p2: &Point<Real>, h: Real ) -> Vector<Real>

Differential wrt. the coordinates of p1.

source

fn points_apply_diff2( p1: &Point<Real>, p2: &Point<Real>, h: Real ) -> Vector<Real>

Differential wrt. the coordinates of p2.

Object Safety§

This trait is not object safe.

Implementors§