Routine to calculate the integration weights for the Gauss-Lobatto Quadrature points.
Note. I currently don't remember where this equation comes from.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | alpha | The value of . |
||
real(kind=wp), | intent(in) | :: | beta | The value of . |
||
integer(kind=ip), | intent(in) | :: | n | The order of the Jacobi polynomials. |
||
real(kind=wp), | intent(in), | dimension(:) | :: | r | The points for which the weights should be determined. |
|
real(kind=wp), | intent(out), | dimension(:) | :: | w | On return the integration weights. |
subroutine GaussWeigths( alpha, beta, n, r, w )
!! Routine to calculate the integration weights for the Gauss-Lobatto
!! Quadrature points.
!!
!! Note. I currently don't remember where this equation comes from.
real(wp), dimension(:), intent(in) :: r
!! The points for which the weights should be determined.
real(wp), intent(in) :: alpha
!! The value of \(\alpha\).
real(wp), intent(in) :: beta
!! The value of \(\beta\).
integer(ip), intent(in) :: n
!! The order of the Jacobi polynomials.
real(wp), dimension(:), intent(out) :: w
!! On return the integration weights.
w = (2.0_wp*n+1.0_wp)/(n*(n+1.0_wp)) / JacobiP(r, alpha, beta, n)**2
end subroutine GaussWeigths