NLSL
fz.f90
Go to the documentation of this file.
1 c NLS VERSION
2 c**********************************************************************
3 c
4 c This double precision function evaluates the integrand of
5 c the orientational integral in the definition of the starting
6 c vector. The integral over the gamma Euler angle is done
7 c analytically.
8 c
9 c Notes:
10 c 1) The L and K quantum numbers are passed via a
11 c common block.
12 c 2) For more information on the evaluation of the
13 c modified Bessel and associated Legendre functions
14 c see the respective routines.
15 c 3) The often used special case of lptmx=2, kptmx=0
16 c is handled separately for faster execution.
17 c
18 c written by DJS 10-SEP-87
19 c
20 c Includes:
21 c eprprm.inc
22 c
23 c Uses:
24 c bessi.f
25 c plgndr.f
26 c
27 c**********************************************************************
28 c
29  double precision function fz(z)
30 c
31  use eprprm
32 c
33  implicit none
34  double precision z
35 c
36  integer lr,kr,iberr
37  common/ifzdat/lr,kr,iberr
38 c
39  double precision a,b
40  integer k,ierr
41 c
42  double precision DSQ24,DSQ360
43  parameter(dsq24=4.89897948556635619639d0,
44  # dsq360=18.97366596101027599199d0)
45 c
46  double precision bessi,plgndr
47  external bessi,plgndr
48 c
49 c######################################################################
50 c
51  iberr=0
52 c
53  if((lptmx.eq.2).and.(kptmx.eq.0)) then
54  if(kr.eq.0) then
55  fz=dexp(0.5d0*cpot(2,1)*plgndr(2,0,z))*
56  # plgndr(lr,kr,z)
57  else
58  fz=0.0d0
59  end if
60  else
61  a=0.5d0*(cpot(2,1)*plgndr(2,0,z)
62  # +cpot(3,1)*plgndr(4,0,z))
63  if (kptmx.ne.0) then
64  b=cpot(2,2)*plgndr(2,2,z)/dsq24
65  # +cpot(3,2)*plgndr(4,2,z)/dsq360
66  else
67  b=0.0d0
68  end if
69  k=kr/2
70  fz=bessi(k,b,ierr)*dexp(a)*plgndr(lr,kr,z)
71  if (ierr.ne.0) iberr=-1
72  end if
73 c
74  return
75  end
double precision, dimension(5, 5), save cpot
Definition: eprprm.f90:78
double precision function fz(z)
Definition: fz.f90:30
integer, save lptmx
Definition: eprprm.f90:82
integer, save kptmx
Definition: eprprm.f90:82