C309: Coulomb Wave, Bessel, and Spherical Bessel Functions for Complex Argument(s) and Order

Author(s): I.J. Thompson, A.R. Barnett Library: MATHLIB
Submitter: K.S. Kölbig Submitted: 15.01.1988
Language: Fortran Revised: 15.11.1995

Subroutine subprograms CCLBES and WCLBES calculate any one of the following sequences of functions:

  1. Regular and irregular Coulomb wave functions tex2html_wrap_inline243
    and their first derivatives with respect to z, tex2html_wrap_inline247 ,
    or simple combination of these;
  2. Spherical Bessel functions tex2html_wrap_inline249
    and their first derivatives with respect to z, tex2html_wrap_inline253 ,
    or simple combination of these (spherical Hankel functions);
  3. Bessel functions tex2html_wrap_inline255
    and their first derivatives with respect to z, tex2html_wrap_inline259 ,
    or simple combination of these (Hankel functions);
  4. Modified Bessel functions tex2html_wrap_inline261
    and their first derivatives with respect to z, tex2html_wrap_inline265 ;

for complex arguments tex2html_wrap_inline267 , complex order tex2html_wrap_inline269 , and tex2html_wrap_inline271

The double-precision version WCLBES is available only on computers which support a COMPLEX*16 Fortran data type.

Structure:

SUBROUTINE subprograms
User Entry Names: CCLBES, WCLBES
Internal Entry Names: C309R1, C309R2, C309R3, C309R4, C309R5, C309R6, C309R7, C309R8
Files Referenced: Unit 6
External References: CLGAMA, WLGAMA, CPSIPG, WPSIPG

Usage:

For tex2html_wrap_inline273 (type COMPLEX), tex2html_wrap_inline275 (type COMPLEX*16),

    CALL tCLBES(Z,ETA,ZLMIN,NL,F,G,FP,GP,SIG,KFN,MODE,JFAIL,JPR)
Z
(type according to t) Argument tex2html_wrap_inline277 .
ETA
(type according to t) Argument tex2html_wrap_inline279 (ignored if tex2html_wrap_inline281 ).
ZLMIN
(type according to t) Order tex2html_wrap_inline283 of the first function in the computed sequence.
NL
(INTEGER) Specifies the order tex2html_wrap_inline285 of the last function in the computed sequence. ( tex2html_wrap_inline287 ).
F,G,FP,GP
(type according to t) One-dimensional arrays with dimension (0:d) where d is in each case tex2html_wrap_inline289 . On exit, each of F(n),G(n),FP(n),GP(n) may contain the value of a function of order tex2html_wrap_inline291 , or its first order derivative, tex2html_wrap_inline293 , as specified jointly by KFN and |MODE|.
SIG
(type according to t) One-dimensional array with dimension (0:d), where tex2html_wrap_inline295 . On exit, provided tex2html_wrap_inline297 , SIG(n) contains the Coulomb phase shift tex2html_wrap_inline299 for tex2html_wrap_inline301 .
KFN
(INTEGER) Specifies, in conjunction with the absolute value of MODE, the type of functions which are stored.
MODE
(INTEGER) The absolute value of MODE specifies, in conjunction with KFN, the type of function which are stored, and also specifies which of the arrays F,G,FP,GP are in fact set to meaningful values. The sign of MODE specifies whether or not the functions are multiplied by a scaling factor.
JFAIL
(INTEGER) On exit, JFAIL is set to zero if no error condition is detected. Otherwise JFAIL is set as described under Error handling.
JPR
(INTEGER)
tex2html_wrap_inline303 Suppress printing of error messages.
tex2html_wrap_inline305 Print error messages.

The type of function which is stored in array F depends only on KFN, while the type of function which is stored in array G depends both on KFN and on |MODE|. Arrays FP and GP (if set) contain the first order derivatives with respect to z of the functions in F and G, respectively. Using the abbreviations ( tex2html_wrap_inline309 )

displaymath311

the choice of function is given by the following table:

displaymath313

If KFN=0 the phase shifts tex2html_wrap_inline315 are stored in array SIG. Otherwise SIG is not set.

Which of arrays F,G,FP,GP are in fact set is determined by |MODE| according to the following table:

tex2html_wrap_inline317 F G FP GP
1, 11, 21 set set set set
2, 12, 22 set set - -
3 set - set -
4 set - - -

In both the tables above, a dash indicates that the corresponding array does not contain meaningful values on exit. These arrays are, however, used internally as working space, and must therefore be dimensioned correctly. The sign of MODE specifies whether or not the functions are to be multiplied by a scaling factor, depending only on z, which will bring their values closer to unity when |z| is large, or tex2html_wrap_inline323 is small and tex2html_wrap_inline325 . The same scaling factor is applied to the first order derivatives in FP or GP as is applied to the functions in F or G, respectively.

MODE
tex2html_wrap_inline327 No scaling factor.
MODE
tex2html_wrap_inline329 Let tex2html_wrap_inline331 if tex2html_wrap_inline333 , tex2html_wrap_inline335 if tex2html_wrap_inline337 ; then the scaling factors for F and G are

displaymath339

Method:

The method is described in the References.

Restrictions:

See Ref. 1, in particular Sect. 4.

Accuracy:

The absolute values of the results are usually accurate to within two or three decimal digits of the machine precision. For details of exceptions see Ref. 1, Sect. 4.

Error handling:

If an error condition is detected, JFAIL is set to one of the following values and a message is printed if tex2html_wrap_inline341 .

tex2html_wrap_inline343
An arithmetic error occurred during the final recursion. Correct results are available up to and including subscript value NL-JFAIL-1.
tex2html_wrap_inline345
One of the continued fraction calculations failed or there was an arithmetic error before any results could be calculated.
tex2html_wrap_inline347
Argument out of range.
tex2html_wrap_inline349
One or more functions corresponding to tex2html_wrap_inline351 could not be calculated. Some values corresponding to tex2html_wrap_inline353 may be correct.
tex2html_wrap_inline355
Excessive internal cancellation probably renders the result meaningless.

This program package is a modified version of the CPC Program Library package COULCC (see Ref. 1). The changes are formal, not computational.

References:

  1. I.J. Thompson and A.R. Barnett, COULCC: A continued-fraction algorithm for Coulomb functions of complex order with complex arguments, Comput. Phys. Comm. 36 (1985) 363-372.
  2. I.J. Thompson and A.R. Barnett, Coulomb and Bessel functions of complex arguments and order, J. Comput. Phys. 64 (1986) 490-509.

A copy of Ref. 1 is available in the Program Library Office.
tex2html_wrap_inline357



Michel Goossens Tue Jun 4 21:08:00 METDST 1996