42 function w3j(n1,n2,n3,n4,n5,n6)
47 integer n1,n2,n3,n4,n5,n6
49 integer j1,j2,j3,m1,m2,m3,jdelta,k
50 double precision phase,parity,x,y,z,ztemp1,ztemp2
52 double precision wig3j
60 if ((n1.lt.0).or.(n2.lt.0).or.(n3.lt.0).or.
61 # ((n2.gt.2).and.(n1+n2+n3+1.gt.2*(
mxlval+8)+1)))
then
62 write (*,*)
'*** quantum nubers too large in w3j ***'
66 if ((abs(n4).gt.n1).or.(abs(n5).gt.n2).or.(abs(n6).gt.n3).or.
67 # ((n4+n5+n6).ne.0).or.
68 # ((n1+n2).lt.n3).or.((n1+n3).lt.n2).or.((n2+n3).lt.n1))
then
85 w3j=wig3j(j1,j2,j3,m1,m2,m3)
103 if (mod(j1+j2+j3,2).eq.0)
then
128 if (mod(j1-m3,2).ne.0)
then
142 w3j=phase/sqrt(dble(2*j1+1))
143 else if (j2.eq.2)
then
144 ztemp2=x*(x+1.0d0)*(x+2.0d0)*(x+3.0d0)*(x+4.0d0)
146 if (jdelta.eq.0)
then
147 ztemp1=2.0d0*dble(3*m3*m3-j1*(j1+1))
148 w3j=phase*ztemp1/sqrt(ztemp2)
149 else if (jdelta.eq.1)
then
150 ztemp1=6.0d0*(z+1.0d0)*(y+1.0d0)
151 w3j=-phase*2.0d0*dble(m3)*sqrt(ztemp1/ztemp2)
153 ztemp1=6.0d0*(z+2.0d0)*(z+1.0d0)
154 # *(y+2.0d0)*(y+1.0d0)
155 w3j=phase*sqrt(ztemp1/ztemp2)
157 else if (m2.eq.1)
then
158 if (jdelta.eq.0)
then
159 ztemp1=6.0d0*(z+1.0d0)*y
160 w3j=phase*dble(2*m3+1)
161 # *sqrt(ztemp1/ztemp2)
162 else if (jdelta.eq.1)
then
164 w3j=-phase*dble(2*j1+4*m3+4)*
165 # sqrt(ztemp1/ztemp2)
167 ztemp1=(z+2.0d0)*y*(y+1.0d0)*(y+2.0d0)
168 w3j=phase*2.0d0*sqrt(ztemp1/ztemp2)
171 if (jdelta.eq.0)
then
172 ztemp1=6.0d0*(y-1.0d0)*y
173 # *(z+1.0d0)*(z+2.0d0)
174 w3j=phase*sqrt(ztemp1/ztemp2)
175 else if (jdelta.eq.1)
then
176 ztemp1=(y-1.0d0)*y*(y+1.0d0)*(z+2.0d0)
177 w3j=-phase*2.d0*sqrt(ztemp1/ztemp2)
179 ztemp1=(y-1.0d0)*y*(y+1.0d0)*(y+2.0d0)
180 w3j=phase*sqrt(ztemp1/ztemp2)
185 ztemp2=(x+1.0d0)*(x+2.0d0)*(x+3.0d0)
187 if (jdelta.eq.0)
then
188 w3j=-phase*2.0*dble(m3)/sqrt(ztemp2)
190 ztemp1=2.0d0*(y+1.0d0)*(z+1.0d0)
191 w3j=-phase*sqrt(ztemp1/ztemp2)
194 if (jdelta.eq.0)
then
195 ztemp1=2.0d0*y*(z+1.0d0)
196 w3j=-phase*sqrt(ztemp1/ztemp2)
199 w3j=-phase*sqrt(ztemp1/ztemp2)
237 double precision bncf0,temp
281 function wig3j(j1,j2,j3,m1,m2,m3)
286 double precision wig3j
287 integer j1,j2,j3,m1,m2,m3
288 integer i,j,k,l,m,n,p,q,z,zmin,zmax,bp,bnj,bmk
291 data notset / .true. /
312 write (*,1000) j1,j2,j3,m1,m2,m3
327 if (sum.ne.0.0d0)
then
328 if (mod(i+l+zmax,2).ne.0) sum=-sum
343 1000
format(
' wig3j called with (',6(i3,
','),
'):'/
344 #
' sum of L values exceeds limit')
double precision function wig3j(j1, j2, j3, m1, m2, m3)
double precision, dimension(nbncf), save bncf
double precision function w3j(n1, n2, n3, n4, n5, n6)
integer, dimension(nb), save bncfx
integer, parameter mxlval