Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] adgo_v1_0.gz(9 Kbytes)
Manuscript Title: Evaluation of Legendre functions of argument greater than one.
Authors: A. Gil, J. Segura
Program title: DLEGENI, DLEGENS
Catalogue identifier: ADGO_v1_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 105(1997)273
Programming language: Fortran.
Computer: Hewlett Packard 715/100.
Operating system: UNIX.
Word size: 32
Keywords: General purpose, Legendre functions, Toroidal, Functions, Continued fraction.
Classification: 4.7.

Nature of problem:
We include two codes in order to evaluate: 1) Legendre functions of half-integral order (subroutine DLEGENS) 2) Legendre functions of integral order (subroutine DLEGENI) Both codes evaluate Legendre functions of the first and second kinds from the lower (positive) orders to a maximum order NMAX in the same run. The algorithms find their application in problems with a spheroidal (integral order) or toroidal (semi-integral order) geometry. We show as an example the application of subroutine DLEGENS to the evaluation of the electrostatic field due to a charged toroidal conductor at potential V.

Solution method:
We have developed a fast code to evaluate Legendre functions of integral and half-integral order based on continued fractions. This algorithm does not require any trial values to start the recurrences nor any renormalization; the codes evaluate first kind Legendre functions (P'nu s) through forward recurrence starting from the calculation of the lower positive order P's and then, after using a continued fraction for the second kind Legendre function (Qnu) and the wronskian relation, applies backward recurrence for the Q'nu s.

The maximum order that can be reached with our method, for a fixed real positive value of z, is provided by the maximum real number defined in our machine. The codes can be used for real z > 1 (See text (LONG WRITE-UP: section 4)).

Running time:
See text (LONG WRITE-UP: section 4)