gauss_legendre Subroutine

public pure subroutine gauss_legendre(x, w)

Calculates the nodes and weights to perform Gauss-Legendre quadrature on the interval [-1, 1]

NOTE: This subroutine has been tested for array lengths up to 64 and delivers an accuracy of 1e-14.

Arguments

Type IntentOptional Attributes Name
real(kind=FP), intent(out) :: x(:)

Quadrature nodes

real(kind=FP), intent(out) :: w(:)

Quadrature weights