getwght1d_linear Function

public pure function getwght1d_linear(r) result(weight)

Weight function for 1d linear interpolation or distribution. Given the distance from particle to fluid cell barycenter, it returns weight, where weight is a linear function of the distance between the position of the particle and the barycenter of the lattice site we are distributing to.

Arguments

Type IntentOptional Attributes Name
real(kind=rk), intent(in) :: r

Distance r = xp - x/dx from particle to lattice barycenter

Return Value real(kind=rk)