This module provides utility functions for computing Jacobi matrices and zeroth moments. More...
Functions/Subroutines | |
type(gjp_sparse_matrix) function | jacobi_matrix (n, alpha, beta) |
Computes the Jacobi matrix for given parameters. More... | |
real(dp) function | jacobi_zeroeth_moment (alpha, beta) |
Computes the zeroth moment for Jacobi polynomials. More... | |
This module provides utility functions for computing Jacobi matrices and zeroth moments.
This module contains essential functions for working with Jacobi polynomials. These functions are particularly useful for various numerical methods that utilize Jacobi polynomials. The module provides a function for generating a Jacobi matrix and another for calculating the zeroth moment of Jacobi polynomials.
Functions included are:
type(gjp_sparse_matrix) function gjp_common::jacobi_matrix | ( | integer, intent(in) | n, |
real(dp), intent(in) | alpha, | ||
real(dp), intent(in) | beta | ||
) |
Computes the Jacobi matrix for given parameters.
The Jacobi matrix is computed as: [ J_{i,j} = \begin{cases} \alpha & \text{if } i = j \ \beta & \text{if } |i-j| = 1 \ 0 & \text{otherwise} \end{cases} ]
[in] | n | Size of the matrix, number of points |
[in] | alpha | parameter for Jacobi polynomials |
[in] | beta | parameter for Jacobi polynomials |
Definition at line 49 of file gjp_common.f90.
real(dp) function gjp_common::jacobi_zeroeth_moment | ( | real(dp), intent(in) | alpha, |
real(dp), intent(in) | beta | ||
) |
Computes the zeroth moment for Jacobi polynomials.
The zeroth moment is computed using the formula: [ \text{zmom} = 2^{(\alpha + \beta + 1)} \frac{\Gamma(\alpha + 1) \Gamma(\beta + 1)}{\Gamma(2 + \alpha + \beta)} ] Where (\Gamma) is the gamma function.
[in] | alpha | parameter for Jacobi polynomials |
[in] | beta | parameter for Jacobi polynomials |
Definition at line 89 of file gjp_common.f90.