Legendre module written by Son, Sang-Kil in Dec. 2003 rewritten by Son, Sang-Kil in Feb. 2005 - May 2005 author Sang-Kil Son generate_LGL_points is rewritten with Fortran 90 from Appendix C in Canuto, Spectral Methods in Fluid Dynamics (1988).
Function to calculate the Legendre function of x with order n
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
real(kind=long), | intent(in) | :: | x |
Function to compute the associated Legendre function of x with order l & m ref) Numerical Recipes in Fortran, pp 246-248
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | l | |||
integer, | intent(in) | :: | m | |||
real(kind=long), | intent(in) | :: | x |
Function to calculate 1st derivative of the Legendre f. of x with order n
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
real(kind=long), | intent(in) | :: | x |
this function calculates all associated Legendre polynomials for every l,m < lmax and return them in an array adapted from the numerical recipes implementation
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | lmax | |||
real(kind=long), | intent(in) | :: | x | |||
real(kind=long), | intent(out), | dimension((lmax + 1)*(lmax + 2)/2) | :: | p |
Calculate the value of the Legendre polynomial and its derivative input : n = the order of poly., x = the point to be calculated results : p = P_n(x), dp = P'_n(x)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
real(kind=long), | intent(in) | :: | x | |||
real(kind=long), | intent(out) | :: | p | |||
real(kind=long), | intent(out) | :: | dp |