This module provides routines for numerical integration using Gauss-Jacobi quadrature. More...
Functions/Subroutines | |
subroutine | gauss_jacobi_algo665 (npts, alpha, beta, x, wts) |
Computes the zeros and weights for Gauss-Jacobi quadrature. More... | |
This module provides routines for numerical integration using Gauss-Jacobi quadrature.
The implementation is based on the GW method as implemented in the GaussJacobiQuad with a modernized version of the implicit QL in Algorithm 655 from ACM Collected Algorithms.
References:
subroutine gjp_algo665::gauss_jacobi_algo665 | ( | integer, intent(in) | npts, |
real(dp), intent(in) | alpha, | ||
real(dp), intent(in) | beta, | ||
real(dp), dimension(npts), intent(out) | x, | ||
real(dp), dimension(npts), intent(out) | wts | ||
) |
Computes the zeros and weights for Gauss-Jacobi quadrature.
This subroutine computes the zeros (x
) and weights (w
) for Gauss-Jacobi quadrature by diagonalizing the Jacobi matrix. The solution involves finding the eigenvalues of the Jacobi matrix, which are the roots of the Jacobi polynomial. Since the Jacobi matrix is a symmetric tridiagonal matrix, the LAPACK DSTEQR routine is used, utilizing its specific form for tridiagonal matrices.
The Jacobi matrix is represented as: [ J = \begin{bmatrix} \alpha & \beta & 0 & \cdots & 0 \ \beta & \alpha & \beta & \cdots & 0 \ \vdots & \vdots & \ddots & \ddots & \vdots \ 0 & 0 & \cdots & \beta & \alpha \end{bmatrix} ]
Z
is initialized as the identity matrix, and the eigenvectors are used to compute the wts.
[in] | npts | Number of x |
[in] | alpha | parameter for Jacobi polynomials |
[in] | beta | parameter for Jacobi polynomials |
[out] | x | Zeros of Jacobi polynomials |
[out] | wts | weights for Gauss-Jacobi quadrature |
Definition at line 60 of file gjp_algo665.f90.