60 integer,
intent(in) :: npts
61 real(dp),
intent(in) :: alpha, beta
62 real(dp),
intent(out) :: x(npts), wts(npts)
63 real(dp) :: zeroeth_moment
65 real(dp) :: diagonal_elements(npts), &
66 off_diagonal_elements(npts - 1), &
67 eigenvectors(npts, npts), &
68 workspace(2 * npts - 2)
69 integer :: computation_info, i
75 diagonal_elements = jacobi_mat%diagonal(1:npts)
76 off_diagonal_elements = jacobi_mat%off_diagonal(1:npts - 1)
81 eigenvectors(i, i) = 1.0_dp
85 call dsteqr(
'V', npts, diagonal_elements, off_diagonal_elements, &
86 eigenvectors, npts, workspace, computation_info)
88 if (computation_info /= 0)
then
89 write (*, *)
'Error in DSTEQR, info:', computation_info
97 wts = eigenvectors(1, :)**2 * zeroeth_moment
This module provides utility functions for computing Jacobi matrices and zeroth moments.
type(gjp_sparse_matrix) function jacobi_matrix(n, alpha, beta)
Computes the Jacobi matrix for given parameters.
real(dp) function jacobi_zeroeth_moment(alpha, beta)
Computes the zeroth moment for Jacobi polynomials.
Module for computing Gauss-Jacobi quadrature nodes and weights using the Golub-Welsch (GW) method.
subroutine gauss_jacobi_gw(npts, alpha, beta, x, wts)
Computes the zeros and weights for Gauss-Jacobi quadrature.
LAPACK Interface for Gauss Jacobi Polynomials.
Module for defining types and precision levels for Gauss-Jacobi Polynomial (GJP) calculations.
integer, parameter, public dp
Define various kinds for real numbers.
Sparse representation of a Jacobi matrix.