simpleMoment Interface

interface
public pure module function simpleMoment(m, f, vPoints, vWidths, g) result(res)

Arguments

Type IntentOptional Attributes Name
integer(kind=ik), intent(in) :: m

Moment degree

real(kind=rk), intent(in), dimension(:) :: f

Distribution function to take the moment of

real(kind=rk), intent(in), dimension(:) :: vPoints

Coordinates of cell centres in velocity space

real(kind=rk), intent(in), dimension(:) :: vWidths

Widths of velocity space cells

real(kind=rk), intent(in), optional, dimension(:) :: g

Optional velocity space array to include in moment integral

Return Value real(kind=rk)

Description

Returns the m-th moment of passed distribution function harmonic - 4piint(v^(2+m)fdv). Optionally takes moment of f*g where g conforms to f. The integration is a simple Riemann sum.