[][src]Trait salva2d::kernel::Kernel

pub trait Kernel: Send + Sync {
    fn scalar_apply<N: RealField>(r: N, h: N) -> N;
fn scalar_apply_diff<N: RealField>(r: N, h: N) -> N; fn apply<N: RealField>(v: Vector<N>, h: N) -> N { ... }
fn apply_diff<N: RealField>(v: Vector<N>, h: N) -> Vector<N> { ... }
fn points_apply<N: RealField>(p1: &Point<N>, p2: &Point<N>, h: N) -> N { ... }
fn points_apply_diff1<N: RealField>(
        p1: &Point<N>,
        p2: &Point<N>,
        h: N
    ) -> Vector<N> { ... }
fn points_apply_diff2<N: RealField>(
        p1: &Point<N>,
        p2: &Point<N>,
        h: N
    ) -> Vector<N> { ... } }

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

Required methods

fn scalar_apply<N: RealField>(r: N, h: N) -> N

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

fn scalar_apply_diff<N: RealField>(r: N, h: N) -> N

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

Loading content...

Provided methods

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

Evaluate the kernel for the given vector.

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

Differential wrt. the coordinates of v.

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

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

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

Differential wrt. the coordinates of p1.

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

Differential wrt. the coordinates of p2.

Loading content...

Implementors

impl Kernel for CubicSplineKernel[src]

impl Kernel for Poly6Kernel[src]

impl Kernel for SpikyKernel[src]

impl Kernel for ViscosityKernel[src]

Loading content...