Program title: Associated Legendre Functions
Catalogue identifier: AEHE_v1_0
Program summary URL: http://cpc.cs.qub.ac.uk/summaries/AEHE_v1_0.html
Program obtainable from: CPC Program Library, Queen's University, Belfast, N. Ireland
Licensing provisions: Standard CPC licence, http://cpc.cs.qub.ac.uk/licence/licence.html
No. of lines in distributed program, including test data, etc.: 6722
No. of bytes in distributed program, including test data, etc.: 310 210
Distribution format: tar.gz
Programming language: Fortran 90
Computer: Linux systems
Operating system: Linux
RAM: bytes
Classification: 4.7
Nature of problem: Compute the regular and irregular associated Legendre functions for integer values of the degree and order and for all real arguments. The computation of the interaction of two electrons, 1/r1−r2, in prolate spheroidal coordinates is used as one example where these functions are required for all values of the argument and we are able to easily compare the series expansion in associated Legendre functions and the exact value.
Solution method: The code evaluates the regular and irregular associated Legendre functions using forward recursion when x<1 starting the recursion with the analytically known values of the first two members of the sequence. For values of the argument x<1, the upward recursion over the degree for the regular functions is numerically stable. For the irregular functions, backward recursion must be applied and a suitable method of starting the recursion is required. The program has two options; a modified version of Miller's algorithm and the use of the Wronskian relation between the regular and irregular functions, which was the method considered in [1]. Both approaches require the computation of a continued fraction to begin the recursion. The Wronskian method (which can also be described as a modified Miller's method) is a convenient method of computations when both the regular and irregular functions are needed.
Running time: The example tests provided take a few seconds to run.
References:
[1] A. Gil, J. Segura, A code to evaluate prolate and oblate spheroidal harmonics, Comput. Phys. Commun. 108 (1998) 267–278.