DTORH3 2.0: a new version of a computer program for the evaluation of toroidal harmonics. A. Gil, J. Segura.

PROGRAM SUMMARY
Title of program: DTORH3 v 2.0
Catalogue identifier: ADOH
Ref. in CPC: 139(2001)186
Distribution format: tar gzip file
Operating system: UNIX, Linux
Number of lines in distributed program, including test data, etc: 1691
Keywords: Toroidal harmonics, Legendre functions, Laplace's equation, Toroidal coordinates, General purpose.
Programming language used: Fortran
Computer: Hewlett Packard 715/100 , SUN Enterprise 3000 , Pentium II 350MHz .

Other versions of this program:

 Cat. Id.  Title                             Ref. in CPC
 ADKV      DTORH1, DTORH2, DTORH3             124(2000)104                   
 

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]).

Method of solution:
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:
  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).

Typical 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.