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§
sourcefn scalar_apply(r: Real, h: Real) -> Real
fn scalar_apply(r: Real, h: Real) -> Real
Evaluates the kernel for the given scalar r
and the reference support length h
.
sourcefn scalar_apply_diff(r: Real, h: Real) -> Real
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§
sourcefn apply_diff(v: Vector<Real>, h: Real) -> Vector<Real>
fn apply_diff(v: Vector<Real>, h: Real) -> Vector<Real>
Differential wrt. the coordinates of v
.
sourcefn points_apply(p1: &Point<Real>, p2: &Point<Real>, h: Real) -> Real
fn points_apply(p1: &Point<Real>, p2: &Point<Real>, h: Real) -> Real
Evaluate the kernel for the vector equal to p1 - p2
.
Object Safety§
This trait is not object safe.