SpecialFunctions.jl icon indicating copy to clipboard operation
SpecialFunctions.jl copied to clipboard

Associated Legendre polynomials are requested

Open feima0011 opened this issue 7 years ago • 11 comments

Associated Legendre polynomials are requested https://en.wikipedia.org/wiki/Associated_Legendre_polynomials

feima0011 avatar Oct 02 '18 23:10 feima0011

I would love to try and implement these! Working on it.

ludoro avatar Dec 14 '18 06:12 ludoro

@feima0011 Can you expand on how you're using them? i.e. are you evaluating the same polynomial multiple times? If so, is it on a grid?

simonbyrne avatar Dec 18 '18 21:12 simonbyrne

@feima0011 Can you expand on how you're using them? i.e. are you evaluating the same polynomial multiple times? If so, is it on a grid?

I am working on the acoustic wave equations. I need the Associated Legendre polynomials to calculate the spherical harmonics. I have to calculate the value of the Associated Legendre polynomials multiple times, and they are on a grid.

feima0011 avatar Dec 18 '18 22:12 feima0011

Do you have a link to code where they are used?

simonbyrne avatar Dec 18 '18 22:12 simonbyrne

Currently, i am using the GSL.jl library to calculate the Associated Legendre polynomials . The following library have code for calculate the Associated Legendre polynomials, but it is outdated. https://github.com/milthorpe/SphericalHarmonics.jl

feima0011 avatar Dec 18 '18 22:12 feima0011

Have you tried using the spherical harmonica transforms in FastTransforms.jl? There is an example on usage here https://github.com/MikaelSlevinsky/FastTransforms.jl/blob/master/examples/sphere.jl

MikaelSlevinsky avatar Dec 28 '18 03:12 MikaelSlevinsky

Hi Richard Mikael Slevinsky :

I have heard that package before. I think a standalone code to compute the Legendre polynomial is better than the code in that package.

fei

On Fri, Dec 28, 2018 at 2:56 PM Richard Mikael Slevinsky < [email protected]> wrote:

Have you tried using the spherical harmonica transforms in FastTransforms.jl? There is an example on usage here https://github.com/MikaelSlevinsky/FastTransforms.jl/blob/master/examples/sphere.jl

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JuliaMath/SpecialFunctions.jl/issues/124#issuecomment-450284735, or mute the thread https://github.com/notifications/unsubscribe-auth/AVmmpYxsgsAQI9V0UufjbpO78DNu3NFUks5u9ZZ_gaJpZM4XFCOL .

feima0011 avatar Dec 28 '18 04:12 feima0011

I agree with Fei. Associated Legendre polynomials, and spherical harmonics, are core to so many branches of physics. They involve many connections to other special functions and complicated identities. It makes sense to have them embedded in SpecialFunctions.jl.

arturgower avatar Jun 28 '19 16:06 arturgower

We could start at Legendre Polynomials, then Associated Legendre Polynomials and then Spherical Harmonics?

Concerning Legendre Polynomials We should implement a standard method using the recurrenc relation which is alright for small orders. For higher orders I found a paper which describes an algorithm to compute Legendre Polynomials in constant time by precomputation. It is quite involved. I am not sure if we should include that in SpecialFunctions. Maybe a standalone package is better?

PaulXiCao avatar Aug 15 '19 20:08 PaulXiCao

The associated Legendre polynomials (functions of first kind) have been implemented by a simple recursion formula in pr #175 (one of the later commits).

PaulXiCao avatar Aug 18 '19 19:08 PaulXiCao

Should this be merged with issues #175 and #177 ???

LeoGalPras avatar Sep 05 '19 11:09 LeoGalPras