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:
- Regular and irregular Coulomb wave functions
and their first derivatives with respect to z,
,
or simple combination of these;
- Spherical Bessel functions
and their first derivatives with respect to z,
,
or simple combination of these (spherical Hankel functions);
- Bessel functions
and their first derivatives with respect to z,
,
or simple combination of these (Hankel functions);
- Modified Bessel functions
and their first derivatives with respect to z,
;
for complex arguments , complex order
, and
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 (type COMPLEX), (type
COMPLEX*16),
CALL tCLBES(Z,ETA,ZLMIN,NL,F,G,FP,GP,SIG,KFN,MODE,JFAIL,JPR)
- Z
- (type according to t) Argument .
- ETA
- (type according to t) Argument
(ignored if ).
- ZLMIN
- (type according to t)
Order of the first function in the computed sequence.
- NL
- (INTEGER)
Specifies the order of the last
function in the computed sequence. ( ).
- F,G,FP,GP
- (type according to t)
One-dimensional arrays with dimension (0:d)
where d is in each case .
On exit, each of F(n),G(n),FP(n),GP(n) may contain
the value of a function of order , or its first
order derivative, , as specified jointly by
KFN and |MODE|.
- SIG
- (type according to t)
One-dimensional array with dimension (0:d),
where . On exit, provided ,
SIG(n) contains the Coulomb phase shift for
.
- 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)
-
- Suppress printing of error messages.
-
- 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 ( )
the choice of function is given by the following table:
If KFN=0 the phase shifts 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:
| 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 is small
and . 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
- No scaling factor.
- MODE
- Let if
, if ;
then the scaling factors for F and G are
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
.
-
- An arithmetic error occurred
during the final recursion. Correct results are available up to and
including subscript value NL-JFAIL-1.
-
- One of the continued fraction
calculations failed or there was an arithmetic error before any results
could be calculated.
-
- Argument out of range.
-
- One or more functions
corresponding to could not be calculated. Some values
corresponding to may be correct.
-
- 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:
- 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.
- 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.
Michel Goossens
Tue Jun 4 21:08:00 METDST 1996