Computer Physics Communications Program Library Programs in Physics & Physical Chemistry
[Licence| Download | New Version Template] adkv_v1_0.tar.gz(10 Kbytes) Manuscript Title: Evaluation of toroidal harmonics. Authors: J. Segura, A. Gil Program title: DTORH1, DTORH2, DTORH3 Catalogue identifier: ADKV_v1_0Distribution format: tar.gz Journal reference: Comput. Phys. Commun. 124(2000)104 Programming language: Fortran. Computer: HP Model 715/100, SUN Enterprise 3000, PC Pentium MMX 200MHz. Operating system: UNIX, Linux. Keywords: General purpose, Function, Toroidal harmonics, Legendre functions, Laplace's equation, Toroidal coordinates. Classification: 4.7. Nature of problem:We include three codes to evaluate toroidal harmonics: DTORH1: This code evaluates toroidal harmonics (TH) of the first and second kinds for a given order m, from the lowest (positive) degreee (n=0) to a maximum degree n = N in the same run. DTORH2: This code evaluates toroidal harmonics of the first and second kinds Pm(n-1/2)(x) and Qm(n-1/2)(x) for orders m = 0,...,M and degrees n = 0,...,N. In this code, for each given order m, TH up to the maximum degree reached by the computer for such order m (N(m)) can be calculated. DTORH3: This code evaluates toroidal harmonics of the first and second kinds for orders m = 0,...,M and degrees n = 0,...,N. TH up to the smallest maximum degree reachable for the different values of m = 0,1,...,M can be calculated. The algorithms find their application in problems with toroidal geometry. In particular, the potential problem for a torus is solved using both Ps and Qs. Solution method:The codes are based on the application of recurrence relations both over m and n. The recurrence over n is applied forward for the Ps and backward for the Qs while, over m, the situation is the contrary: the Ps are evaluated backwards and the Qs forward. 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 recurrences are fed with the two starting values Q0(1/2) and Q1(-1/2), which are evaluated using Carlson's duplication formula for elliptic integrals. 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.001 < x < 1000 for all available values of the orders and degrees. For more details see text: LONG WRITE-UP, section 3. Running time:Depends on the values of the argument x, the orders (m) and the degrees (n). As an example, to evaluate the set {Pm(n-1/2)(1.1), Qm(n-1/2)(1.1), m = 0,...,10, n = 0,...,50,} the code DTORH3 spends 2.6 ms in a HP 715/100. For more details see text: LONG WRITE-UP, section 5.
 Disclaimer | ScienceDirect | CPC Journal | CPC | QUB