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] adkv_v2_0.tar.gz(12 Kbytes)
Manuscript Title: DTORH3 2.0: a new version of a computer program for the evaluation of toroidal harmonics.
Authors: A. Gil, J. Segura
Program title: DTORH3 v 2.0
Catalogue identifier: ADKV_v2_0
Distribution format: tar.gz
Journal reference: Comput. Phys. Commun. 139(2001)186
Programming language: Fortran.
Computer: Hewlett Packard 715/100, SUN Enterprise 3000, Pentium II 350MHz.
Operating system: UNIX, Linux.
Keywords: Toroidal harmonics, Legendre functions, Laplace's equation, Toroidal coordinates, General purpose.
Classification: 4.7.

Nature of problem:
We include a new version of our code DTORH3 to evaluate toroidal harmonics. The algorithms find their application in problems with toroidal geometry (see refs. [1,2]).

Solution method:
The codes are based on the application of recurrence relations for Ps Qs both over m and n. The forward and backward recursions (over n or over m) are linked through continued fractions for the ratio of minimal solutions and Wronskian relations; the CF is replaced by series expansion and asymptotic expansion when it fails to converge.

Summary of revisions:
  1. We consider two different algorithms for the evaluation of the functions P, Q depending on the argument x:
    • When 1 < x < sqrt(2) the called "dual algorithm" is applied (see LONG WRITE-UP).
    • When x > sqrt(2) the called "primal algorithm" is applied.
  2. In addition to continued fractions and series expansions, a uniform asymptotic expansion for PM-1/2(x) uniformly valid for x at large M. As a consequence, the option MODE=2 in the previous version of the code is eliminated.
  3. The range of evaluable arguments x can be further extended by using quadruple precision (if supported for the FORTRAN compiler).

Restrictions:
The maximum degree (order) that can be reached with our method, for a given order (degree) m(n) and for a fixed real positive value of x, is provided by the maximum real number defined in our machine. The user can choose two different relative accuracies (10^-8 or 10^-12) in the interval 1.0001 < x < 10000 for all available values of the orders and degrees. The range for x can be further extended by using quadruple precision for the input x and related variables (see LONG WRITE-UP).

Running time:
Depends on the values of the argument x, the orders (m) and the degrees (n). For more details see text: LONG WRITE-UP, section 4.

References:
[1] Segura, J., Gil, A. Comput. Phys. Commun. 124 (2000) 104.
[2] Gil, A., Segura, J., Temme, N.M. J. Comp. Phys. 161 (81) (2000) 204.