BESSEL1 Subroutine

public subroutine BESSEL1(BJ, Y, H, ARG, LMX, LMAX, LJ, LY, LH, LCALL)

calculates spherical bessel, hankel and neumann functions this subroutine computes the spherical bessel functions of first ,second and third kind using a chebychev expansion given by y.l.luke ,algorithms for the computation of mathematical functions, academic press,london 1977

using subroutine cnwf01

description of variables

arg -input - argument of the bessel functions

lmax -input - max. order of the bessel functions (limited up to 25 in that version)

lj -input - logical : if lj is true the spherical bessel functions of the first kind are calculated up to lmax

ly -input - logical : if ly is true the spherical bessel functions of the second kind are calculated up to lmax

lh -input - logical : if lh is true the spherical bessel functions of the third kind are calculated up to lmax

lcall -input - logical : if lh is false the chebychev coefficients are calculated - this part has to be called once

bj -output - an array containing the bessel functions of the first kind up to lmax if lj is true . remember , that bj(1) contains the function of l=0 and so on.

y -output - an array containing the bessel functions of the second kind up to lmax if ly is true . remember , that y(1) contains the function of l=0 and so on.

h -output - an array containing the bessel functions of the third kind up to lmax if lh is true . remember , that h(1) contains the function of l=0 and so on.

all other variables are for internal use

Warning

Important precautions attention : contrary to abramowitz and stegun the bessel functions of third kind ( hankel functions) are definied as: h(l) = y(l) - i * bj(l)

Arguments

Type IntentOptional Attributes Name
complex(kind=16) :: BJ(LMX+1)
complex(kind=16) :: Y(LMX+1)
complex(kind=16) :: H(LMX+1)
complex(kind=16) :: ARG
integer :: LMX
integer :: LMAX
logical :: LJ
logical :: LY
logical :: LH
logical :: LCALL