Module rgsl::legendre::associated_polynomials [] [src]

The following functions compute the associated Legendre Polynomials P_lm(x). Note that this function grows combinatorially with l and can overflow for l larger than about 150. There is no trouble for small m, but overflow occurs when m and l are both large. Rather than allow overflows, these functions refuse to calculate P_lm(x) and return OvrFlw when they can sense that l and m are too big.

If you want to calculate a spherical harmonic, then do not use these functions. Instead use legendre_sphPlm below, which uses a similar recursion, but with the normalized functions.

Functions

legendre_Plm

This routine computes the associated Legendre polynomial P_lm(x) for m >= 0, l >= m, |x| <= 1.

legendre_Plm_array

This function computes arrays of Legendre polynomials P_lm(x) and derivatives dP_lm(x)/dx, for m >= 0, l = |m|, ..., lmax, |x| <= 1.

legendre_Plm_deriv_array

This function computes arrays of Legendre polynomials P_lm(x) and derivatives dP_lm(x)/dx, for m >= 0, l = |m|, ..., lmax, |x| <= 1.

legendre_Plm_e

This routine computes the associated Legendre polynomial P_lm(x) for m >= 0, l >= m, |x| <= 1.

legendre_array_size

This function returns the size of result_array[] needed for the array versions of P_lm(x), lmax - m + 1.

legendre_sphPlm

This routine computes the normalized associated Legendre polynomial \sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_lm(x) suitable for use in spherical harmonics. The parameters must satisfy m >= 0, l >= m, |x| <= 1. This routine avoids the overflows that occur for the standard normalization of P_lm(x).

legendre_sphPlm_array

This function computes arrays of normalized associated Legendre functions \sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_lm(x), and derivatives, for m >= 0, l = |m|, ..., lmax, |x| <= 1.0

legendre_sphPlm_deriv_array

This function computes arrays of normalized associated Legendre functions \sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_lm(x), and derivatives, for m >= 0, l = |m|, ..., lmax, |x| <= 1.0

legendre_sphPlm_e

This routine computes the normalized associated Legendre polynomial \sqrt{(2l+1)/(4\pi)} \sqrt{(l-m)!/(l+m)!} P_lm(x) suitable for use in spherical harmonics. The parameters must satisfy m >= 0, l >= m, |x| <= 1. This routine avoids the overflows that occur for the standard normalization of P_lm(x).