359 SUBROUTINE calcrand(RAT,LAM,MRR,MRI,EPS,NP,DDELT,NDGS,
360 & NPNAX,AXMAX,B,GAM,NDISTR,NKMAX,NPNA,NCOEFF,
361 & REFF,VEFF,CEXTIN,CSCAT,WALB,ASYMM, F)
362 IMPLICIT REAL*8 (a-h,o-z)
364 real*8 reff,veff,cextin,cscat,walb,asymm
365 real*8 alpha(npl,4),beta(npl,2),
f(npna,4,4)
392 real*8 lam,mrr,mri,x(npng2),w(npng2),s(npng2),ss(npng2),
393 * an(npn1),r(npng2),dr(npng2),
394 * ddr(npng2),drr(npng2),dri(npng2),ann(npn1,npn1)
395 real*8 xg(1000),wg(1000),tr1(npn2,npn2),ti1(npn2,npn2),
396 & alph1(npl),alph2(npl),alph3(npl),alph4(npl),bet1(npl),
397 & bet2(npl),xg1(2000),wg1(2000),
398 & al1(npl),al2(npl),al3(npl),al4(npl),be1(npl),be2(npl)
400 & rt11(npn6,npn4,npn4),rt12(npn6,npn4,npn4),
401 & rt21(npn6,npn4,npn4),rt22(npn6,npn4,npn4),
402 & it11(npn6,npn4,npn4),it12(npn6,npn4,npn4),
403 & it21(npn6,npn4,npn4),it22(npn6,npn4,npn4)
407 COMMON /tmat/ rt11,rt12,rt21,rt22,it11,it12,it21,it22
412 OPEN (6,file=
'tmatr.test')
413 OPEN (10,file=
'tmatr.write')
434 IF (np.EQ.-1.OR.np.EQ.-2) ncheck=1
435 IF (np.GT.0.AND.(-1)**np.EQ.1) ncheck=1
436 WRITE (6,5454) ncheck
437 5454
FORMAT (
'NCHECK=',i1)
439 IF (
abs(rat-1d0).GT.1d-8.AND.np.EQ.-1)
CALL sarea (eps,rat)
440 if (
abs(rat-1d0).GT.1d-8.AND.np.GE.0)
CALL surfch(np,eps,rat)
441 IF (
abs(rat-1d0).GT.1d-8.AND.np.EQ.-2)
CALL sareac (eps,rat)
443 8000
FORMAT (
'RAT=',f8.6)
444 IF(np.EQ.-1.AND.eps.GE.1d0) print 7000,eps
445 IF(np.EQ.-1.AND.eps.LT.1d0) print 7001,eps
446 IF(np.GE.0) print 7100,np,eps
447 IF(np.EQ.-2.AND.eps.GE.1d0) print 7150,eps
448 IF(np.EQ.-2.AND.eps.LT.1d0) print 7151,eps
449 print 7400, lam,mrr,mri
451 7000
FORMAT(
'RANDOMLY ORIENTED OBLATE SPHEROIDS, A/B=',f11.7)
452 7001
FORMAT(
'RANDOMLY ORIENTED PROLATE SPHEROIDS, A/B=',f11.7)
453 7100
FORMAT(
'RANDOMLY ORIENTED CHEBYSHEV PARTICLES, T',
455 7150
FORMAT(
'RANDOMLY ORIENTED OBLATE CYLINDERS, D/L=',f11.7)
456 7151
FORMAT(
'RANDOMLY ORIENTED PROLATE CYLINDERS, D/L=',f11.7)
457 7200
FORMAT (
'ACCURACY OF COMPUTATIONS DDELT = ',d8.2)
458 7400
FORMAT(
'LAM=',f10.6,3x,
'MRR=',d10.4,3x,
'MRI=',d10.4)
461 axi=axmax-dax*dfloat(iax-1)
464 nk=int(axi*nkmax/axmax+2)
465 IF (nk.GT.1000) print 8001,nk
467 IF (ndistr.EQ.3)
CALL power (axi,b,r1,r2)
468 8001
FORMAT (
'NK=',i4,
' I.E., IS GREATER THAN 1000. ',
469 &
'EXECUTION TERMINATED.')
470 CALL gauss (nk,0,0,xg,wg)
474 IF (ndistr.EQ.5)
GO TO 3
490 4
CALL distrb (nk,xg1,wg1,ndistr,axi,b,gam,r1,r2,
493 8002
FORMAT(
'R1=',f10.6,
' R2=',f10.6)
494 IF (
abs(rat-1d0).LE.1d-6) print 8003, reff,veff
495 IF (
abs(rat-1d0).GT.1d-6) print 8004, reff,veff
496 8003
FORMAT(
'EQUAL-VOLUME-SPHERE REFF=',f8.4,
' VEFF=',f7.4)
497 8004
FORMAT(
'EQUAL-SURFACE-AREA-SPHERE REFF=',f8.4,
500 7250
FORMAT(
'NUMBER OF GAUSSIAN QUADRATURE POINTS ',
501 &
'IN SIZE AVERAGING =',i4)
523 ixxx=xev+4.05d0*xev**0.333333d0
525 IF (inm1.GE.npn1) print 7333, npn1
526 IF (inm1.GE.npn1) stop
527 7333
FORMAT(
'CONVERGENCE IS NOT OBTAINED FOR NPN1=',i3,
528 &
'. EXECUTION TERMINATED')
535 IF (ngauss.GT.npng1) print 7340, ngauss
536 IF (ngauss.GT.npng1) stop
537 7340
FORMAT(
'NGAUSS =',i3,
' I.E. IS GREATER THAN NPNG1.',
538 &
' EXECUTION TERMINATED')
539 7334
FORMAT(
' NMAX =', i3,
' DC2=',d8.2,
' DC1=',d8.2)
540 7335
FORMAT(
' NMAX1 =', i3,
' DC2=',d8.2,
542 CALL const(ngauss,nmax,mmax,p,x,w,an,ann,s,ss,np,eps)
543 CALL vary(lam,mrr,mri,a,eps,np,ngauss,x,p,ppi,pir,pii,r,
544 & dr,ddr,drr,dri,nmax)
545 CALL tmatr0 (ngauss,x,w,an,ann,s,ss,ppi,pir,pii,r,dr,
546 & ddr,drr,dri,nmax,ncheck)
556 qsca=qsca+dn1*(tr1nn*tr1nn+ti1nn*ti1nn
557 & +tr1nn1*tr1nn1+ti1nn1*ti1nn1)
558 qext=qext+(tr1nn+tr1nn1)*dn1
560 dsca=
abs((qsca1-qsca)/qsca)
561 dext=
abs((qext1-qext)/qext)
565 nmin=dfloat(nmax)/2d0+1d0
573 dqsca=dn1*(tr1nn*tr1nn+ti1nn*ti1nn
574 & +tr1nn1*tr1nn1+ti1nn1*ti1nn1)
575 dqext=(tr1nn+tr1nn1)*dn1
576 dqsca=
abs(dqsca/qsca)
577 dqext=
abs(dqext/qext)
579 IF (dqsca.LE.ddelt.AND.dqext.LE.ddelt)
GO TO 12
583 IF(dsca.LE.ddelt.AND.dext.LE.ddelt)
GO TO 55
584 IF (nma.EQ.npn1) print 7333, npn1
585 IF (nma.EQ.npn1) stop
588 IF (ngauss.EQ.npng1) print 7336
590 DO 150 ngaus=nnnggg,npng1
593 7336
FORMAT(
'WARNING: NGAUSS=NPNG1')
594 7337
FORMAT(
' NG=',i3,
' DC2=',d8.2,
' DC1=',d8.2)
595 CALL const(ngauss,nmax,mmax,p,x,w,an,ann,s,ss,np,eps)
596 CALL vary(lam,mrr,mri,a,eps,np,ngauss,x,p,ppi,pir,pii,r,
597 & dr,ddr,drr,dri,nmax)
598 CALL tmatr0 (ngauss,x,w,an,ann,s,ss,ppi,pir,pii,r,dr,
599 & ddr,drr,dri,nmax,ncheck)
609 qsca=qsca+dn1*(tr1nn*tr1nn+ti1nn*ti1nn
610 & +tr1nn1*tr1nn1+ti1nn1*ti1nn1)
611 qext=qext+(tr1nn+tr1nn1)*dn1
613 dsca=
abs((qsca1-qsca)/qsca)
614 dext=
abs((qext1-qext)/qext)
618 IF(dsca.LE.ddelt.AND.dext.LE.ddelt)
GO TO 155
619 IF (ngaus.EQ.npng1) print 7336
628 IF (nmax1.GT.npn4) print 7550, nmax1
629 7550
FORMAT (
'NMAX1 = ',i3,
', i.e. greater than NPN4.',
630 &
' Execution terminated')
631 IF (nmax1.GT.npn4) stop
652 qsca=qsca+zz1*zz1+zz2*zz2+zz3*zz3+zz4*zz4
653 & +zz5*zz5+zz6*zz6+zz7*zz7+zz8*zz8
657 CALL tmatr(m,ngauss,x,w,an,ann,s,ss,ppi,pir,pii,r,dr,
658 & ddr,drr,dri,nmax,ncheck)
685 qsc=qsc+(zz1*zz1+zz2*zz2+zz3*zz3+zz4*zz4
686 & +zz5*zz5+zz6*zz6+zz7*zz7+zz8*zz8)*2d0
696 7800
FORMAT(
' m=',i3,
' qxt=',d12.6,
' qsc=',d12.6,
699 coeff1=lam*lam*0.5d0/p
703 7880
FORMAT (
'nmax=',i3,
' nmax1=',i3)
704 CALL gsp (nmax1,csca,lam,al1,al2,al3,al4,be1,be2,lmax)
710 alph1(l1)=alph1(l1)+al1(l1)*wgi
711 alph2(l1)=alph2(l1)+al2(l1)*wgi
712 alph3(l1)=alph3(l1)+al3(l1)*wgi
713 alph4(l1)=alph4(l1)+al4(l1)*wgi
714 bet1(l1)=bet1(l1)+be1(l1)*wgi
715 bet2(l1)=bet2(l1)+be2(l1)*wgi
718 cextin=cextin+cext*wgii
723 alph1(l1)=alph1(l1)/cscat
724 alph2(l1)=alph2(l1)/cscat
725 alph3(l1)=alph3(l1)/cscat
726 alph4(l1)=alph4(l1)/cscat
727 bet1(l1)=bet1(l1)/cscat
728 bet2(l1)=bet2(l1)/cscat
729 alpha(l1,1)=alph1(l1)
730 alpha(l1,2)=alph2(l1)
731 alpha(l1,3)=alph3(l1)
732 alpha(l1,4)=alph4(l1)
737 CALL hovenr(l1max,alph1,alph2,alph3,alph4,bet1,bet2)
739 print 9100,cextin,cscat,walb,asymm
740 9100
FORMAT(
'CEXT=',d12.6,2x,
'CSCA=',d12.6,2x,
741 & 2x,
'W=',d12.6,2x,
'<COS>=',d12.6)
742 IF (walb.GT.1d0) print 9111
743 9111
FORMAT (
'WARNING: W IS GREATER THAN 1')
744 WRITE (10,580) walb,l1max
746 WRITE (10,575) alph1(l),alph2(l),alph3(l),alph4(l),
752 CALL matr (alph1,alph2,alph3,alph4,bet1,bet2,lmax,npna,
f)
755 time=dfloat(itime)/6000d0
757 1001
FORMAT (
' time =',f8.2,
' min')
812 SUBROUTINE gsp(NMAX,CSCA,LAM,ALF1,ALF2,ALF3,ALF4,BET1,BET2,LMAX)
814 IMPLICIT REAL*8 (a-b,d-h,o-z),
COMPLEX*16 (C)
815 real*8 lam,ssign(900)
816 real*8 csca,ssi(npl),ssj(npn1),
817 & alf1(npl),alf2(npl),alf3(npl),
818 & alf4(npl),bet1(npl),bet2(npl),
819 & tr1(npl1,npn4),tr2(npl1,npn4),
820 & ti1(npl1,npn4),ti2(npl1,npn4),
821 & g1(npl1,npn6),g2(npl1,npn6),
822 & ar1(npn4),ar2(npn4),ai1(npn4),ai2(npn4),
823 & fr(npn4,npn4),fi(npn4,npn4),ff(npn4,npn4)
824 real*4 b1r(npl1,npl1,npn4),b1i(npl1,npl1,npn4),
825 & b2r(npl1,npl1,npn4),b2i(npl1,npl1,npn4),
826 & d1(npl1,npn4,npn4),d2(npl1,npn4,npn4),
827 & d3(npl1,npn4,npn4),d4(npl1,npn4,npn4),
828 & d5r(npl1,npn4,npn4),d5i(npl1,npn4,npn4),
829 & plus1(npn6*npn4*npn4*8)
831 & tr11(npn6,npn4,npn4),tr12(npn6,npn4,npn4),
832 & tr21(npn6,npn4,npn4),tr22(npn6,npn4,npn4),
833 & ti11(npn6,npn4,npn4),ti12(npn6,npn4,npn4),
834 & ti21(npn6,npn4,npn4),ti22(npn6,npn4,npn4)
837 COMMON /tmat/ tr11,tr12,tr21,tr22,ti11,ti12,ti21,ti22
838 COMMON /cbess/ b1r,b1i,b2r,b2i
840 equivalence( plus1(1),tr11(1,1,1) )
841 equivalence(d1(1,1,1),plus1(1)),
842 & (d2(1,1,1),plus1(npl1*npn4*npn4+1)),
843 & (d3(1,1,1),plus1(npl1*npn4*npn4*2+1)),
844 & (d4(1,1,1),plus1(npl1*npn4*npn4*3+1)),
845 & (d5r(1,1,1),plus1(npl1*npn4*npn4*4+1))
861 IF(i.LE.nmax) ssj(i)=dsqrt(si)
887 3300
FORMAT (
' B1 AND B2')
935 CALL ccg(n,n1,nmax,k1,k2,g1)
936 nnmax=min0(nmax,n1+n)
937 nnmin=max0(1,iabs(n-n1))
942 m1max=min0(n,nn)+npn6
956 rr1=rr1+tr1(m2,nn)*sig
957 ri1=ri1+ti1(m2,nn)*sig
958 rr2=rr2+tr2(m2,nn)*sig
959 ri2=ri2+ti2(m2,nn)*sig
967 ar1(nn)=aar1*xr-aai1*xi
968 ai1(nn)=aar1*xi+aai1*xr
969 ar2(nn)=aar2*xr-aai2*xi
970 ai2(nn)=aar2*xi+aai2*xr
975 CALL ccg(n,n1,nmax,k3,k4,g2)
988 bbr1=bbr1+sss*ar1(nn)
989 bbi1=bbi1+sss*ai1(nn)
990 bbr2=bbr2+sss*ar2(nn)
991 bbi2=bbi2+sss*ai2(nn)
1006 3301
FORMAT(
' D1, D2, ...')
1012 nn1max=nmax1+min0(n,nn)
1013 DO 180 m1=m1min,m1max
1018 DO 150 nn1=nn1min,nn1max
1028 dd1=dd1+xx*(x1*x3+x2*x4)
1029 dd2=dd2+xx*(x5*x7+x6*x8)
1038 DO 186 m1=m1min,m1max
1046 DO 183 nn1=nn1min,nn1max
1056 dd3=dd3+xx*(x1*x5+x2*x6)
1057 dd4=dd4+xx*(x3*x7+x4*x8)
1058 dd5r=dd5r+xx*(x3*x5+x4*x6)
1059 dd5i=dd5i+xx*(x4*x5-x3*x6)
1074 3303
FORMAT (
' G1, G2, ...')
1076 dk=lam*lam/(4d0*csca*dacos(-1d0))
1087 nnmin=max0(1,iabs(n-l))
1088 nnmax=min0(nmax,n+l)
1089 IF(nnmax.LT.nnmin)
GO TO 290
1090 CALL ccg(n,l,nmax,k1,k2,g1)
1091 IF(l.GE.2)
CALL ccg(n,l,nmax,k5,k6,g2)
1093 DO 280 nn=nnmin,nnmax
1101 DO 270 m1=m1min,m1max
1103 IF(m.GE.0) sss1=g1(m1,nnn)
1104 IF(m.LT.0) sss1=g1(npn6-m,nnn)*si
1105 dm1=dm1+sss1*d1(m1,nn,n)
1106 dm2=dm2+sss1*d2(m1,nn,n)
1109 sss=g1(npn6+1,nnn)*ffn
1112 IF(l.LT.2)
GO TO 280
1121 DO 275 m1=m1min,m1max
1124 dm3=dm3+sss1*d3(m1,nn,n)
1125 dm4=dm4+sss1*d4(m1,nn,n)
1126 dm5r=dm5r+sss1*d5r(m1,nn,n)
1127 dm5i=dm5i+sss1*d5i(m1,nn,n)
1131 sss=g2(npn4,nnn)*ffn
1149 IF(
abs(g1l).LT.1d-6)
GO TO 500
1167 f(i)=
f(i1)+0.5d0*dlog(dfloat(i1))
1182 ssign(n)=-ssign(n-1)
1208 SUBROUTINE ccg(N,N1,NMAX,K1,K2,GG)
1210 IMPLICIT REAL*8 (a-h,o-z)
1211 real*8 gg(npl1,npn6),cd(0:npn5),cu(0:npn5)
1216 &
and.n.LE.nmax)
GO TO 1
1219 5001
FORMAT(
' ERROR IN SUBROUTINE CCG')
1220 1 nnf=min0(n+n1,nmax)
1223 IF(k1.EQ.1.AND.k2.EQ.0)
min=npn6
1228 IF(iabs(m1).GT.n1)
GO TO 90
1229 nnl=max0(iabs(mm),iabs(n-n1))
1230 IF(nnl.GT.nnf)
GO TO 90
1233 IF (nnu.EQ.nnl) nnm=nnl
1234 CALL ccgin(n,n1,m,mm,c)
1236 IF (nnl.EQ.nnf)
GO TO 50
1239 DO 7 nn=nnl+1,min0(nnm,nnf)
1240 a=dfloat((nn+mm)*(nn-mm)*(n1-n+nn))
1241 a=a*dfloat((n-n1+nn)*(n+n1-nn+1)*(n+n1+nn+1))
1243 a=a*dfloat((2*nn+1)*(2*nn-1))
1245 b=0.5d0*dfloat(m-m1)
1248 b=dfloat(2*nn*(nn-1))
1249 b=dfloat((2*m-mm)*nn*(nn-1)-mm*n*(n+1)+
1251 d=dfloat(4*(nn-1)*(nn-1))
1252 d=d*dfloat((2*nn-3)*(2*nn-1))
1253 d=dfloat((nn-mm-1)*(nn+mm-1)*(n1-n+nn-1))/d
1254 d=d*dfloat((n-n1+nn-1)*(n+n1-nn+2)*(n+n1+nn))
1261 IF (nnf.LE.nnm)
GO TO 50
1262 CALL direct(n,m,n1,m1,nnu,mm,c)
1264 IF (nnu.EQ.nnm+1)
GO TO 50
1267 DO 12 nn=nnu-1,nnm+1,-1
1268 a=dfloat((nn-mm+1)*(nn+mm+1)*(n1-n+nn+1))
1269 a=a*dfloat((n-n1+nn+1)*(n+n1-nn)*(n+n1+nn+2))
1270 a=dfloat(4*(nn+1)*(nn+1))/a
1271 a=a*dfloat((2*nn+1)*(2*nn+3))
1273 b=dfloat(2*(nn+2)*(nn+1))
1274 b=dfloat((2*m-mm)*(nn+2)*(nn+1)-mm*n*(n+1)
1276 d=dfloat(4*(nn+2)*(nn+2))
1277 d=d*dfloat((2*nn+5)*(2*nn+3))
1278 d=dfloat((nn+mm+2)*(nn-mm+2)*(n1-n+nn+2))/d
1279 d=d*dfloat((n-n1+nn+2)*(n+n1-nn-1)*(n+n1+nn+3))
1287 IF (nn.LE.nnm) gg(mind,nn+1)=cu(nn)
1288 IF (nn.GT.nnm) gg(mind,nn+1)=cd(nn)
1298 SUBROUTINE direct (N,M,N1,M1,NN,MM,C)
1299 IMPLICIT REAL*8 (a-h,o-z)
1302 c=
f(2*n+1)+
f(2*n1+1)+
f(n+n1+m+m1+1)+
f(n+n1-m-m1+1)
1303 c=c-
f(2*(n+n1)+1)-
f(n+m+1)-
f(n-m+1)-
f(n1+m1+1)-
f(n1-m1+1)
1317 SUBROUTINE ccgin(N,N1,M,MM,G)
1318 IMPLICIT REAL*8 (a-h,o-z)
1319 real*8
f(900),ssign(900)
1324 &
and.n1.GE.iabs(m1).
1325 &
and.iabs(mm).LE.(n+n1))
GO TO 1
1328 5001
FORMAT(
' ERROR IN SUBROUTINE CCGIN')
1329 1
IF (iabs(mm).GT.iabs(n-n1))
GO TO 100
1333 IF(n1.LE.n)
GO TO 50
1345 & *dexp(
f(n+m+1)+
f(n-m+1)+
f(n12+1)+
f(n2-n12+2)-
f(n2+2)
1346 & -
f(n1+m1+1)-
f(n1-m1+1)-
f(n-n1+mm+1)-
f(n-n1-mm+1))
1354 IF(mm.GE.0)
GO TO 150
1359 150 g=a*ssign(n+m+1)
1360 & *dexp(
f(2*mm+2)+
f(n+n1-mm+1)+
f(n+m+1)+
f(n1+m1+1)
1361 & -
f(n+n1+mm+2)-
f(n-n1+mm+1)-
f(-n+n1+mm+1)-
f(n-m+1)
1379 SUBROUTINE power (A,B,R1,R2)
1380 IMPLICIT REAL*8 (a-h,o-z)
1394 DOUBLE PRECISION FUNCTION zeroin (AX,BX,F,TOL)
1395 IMPLICIT REAL*8 (a-h,o-z)
1399 IF (tol1.GT.1d0)
GO TO 10
1408 30
IF (
abs(fc).GE.
abs(fb))
GO TO 40
1415 40 tol1=2d0*eps*
abs(b)+0.5d0*tol
1417 IF (
abs(xm).LE.tol1)
GO TO 90
1418 44
IF (fb.EQ.0d0)
GO TO 90
1419 45
IF (
abs(e).LT.tol1)
GO TO 70
1420 46
IF (
abs(fa).LE.
abs(fb))
GO TO 70
1421 47
IF (a.NE.c)
GO TO 50
1429 p=s*(2d0*xm*q*(q-r)-(b-a)*(r-1d0))
1430 q=(q-1d0)*(r-1d0)*(s-1d0)
1431 60
IF (p.GT.0d0) q=-q
1433 IF ((2d0*p).GE.(3d0*xm*q-
abs(tol1*q)))
GO TO 70
1434 64
IF (p.GE.
abs(0.5d0*e*q))
GO TO 70
1442 IF (
abs(d).GT.tol1) b=b+d
1443 IF (
abs(d).LE.tol1) b=b+dsign(tol1,xm)
1445 IF ((fb*(fc/
abs(fc))).GT.0d0)
GO TO 20
1453 DOUBLE PRECISION FUNCTION f(R1)
1454 IMPLICIT REAL*8 (a-h,o-z)
1457 f=(r2-r1)/dlog(r2/r1)-a
1472 SUBROUTINE distrb (NNK,YY,WY,NDISTR,AA,BB,GAM,R1,R2,REFF,
1474 IMPLICIT REAL*8 (a-h,o-z)
1475 real*8 yy(nnk),wy(nnk)
1476 IF (ndistr.EQ.2)
GO TO 100
1477 IF (ndistr.EQ.3)
GO TO 200
1478 IF (ndistr.EQ.4)
GO TO 300
1479 IF (ndistr.EQ.5)
GO TO 360
1480 print 1001,aa,bb,gam
1481 1001
FORMAT(
'MODIFIED GAMMA DISTRIBUTION, alpha=',f6.4,
' r_c=',
1482 & f6.4,
' gamma=',f6.4)
1489 y=y*dexp(-a2*(x**gam))
1493 100 print 1002,aa,bb
1494 1002
FORMAT(
'LOG-NORMAL DISTRIBUTION, r_g=',f8.4,
1495 &
' [ln(sigma_g)]**2=', f6.4)
1500 y=dexp(-y*y*0.5d0/bb)/x
1505 1003
FORMAT(
'POWER LAW DISTRIBUTION OF HANSEN & TRAVIS 1974')
1511 300 print 1004,aa,bb
1512 1004
FORMAT (
'GAMMA DISTRIBUTION, a=',f6.3,
' b=',f6.4)
1517 x=(x**b2)*dexp(-x*dab)
1522 1005
FORMAT (
'MODIFIED POWER LAW DISTRIBUTION, alpha=',d10.4)
1525 IF (x.LE.r1) wy(i)=wy(i)
1526 IF (x.GT.r1) wy(i)=wy(i)*(x/r1)**bb
1545 reff=reff+x*x*x*wy(i)
1552 veff=veff+xi*xi*x*x*wy(i)
1554 veff=veff/(g*reff*reff)
1560 SUBROUTINE hovenr(L1,A1,A2,A3,A4,B1,B2)
1561 IMPLICIT REAL*8 (a-h,o-z)
1562 real*8 a1(l1),a2(l1),a3(l1),a4(l1),b1(l1),b2(l1)
1566 dl=dfloat(ll)*2d0+1d0
1574 IF(ll.GE.1.AND.
abs(aa1).GE.dl) kontr=2
1575 IF(
abs(aa2).GE.dl) kontr=2
1576 IF(
abs(aa3).GE.dl) kontr=2
1577 IF(
abs(aa4).GE.dl) kontr=2
1578 IF(
abs(bb1).GE.ddl) kontr=2
1579 IF(
abs(bb2).GE.ddl) kontr=2
1580 IF(kontr.EQ.2) print 3000,ll
1588 IF((dl-c*aa1)*(dl-c*aa2)-cc*bb1*bb1.LE.-1d-4) kontr=2
1589 IF((dl-c2)*(dl-c3)+c1.LE.-1d-4) kontr=2
1590 IF((dl+c2)*(dl-c3)-c1.LE.-1d-4) kontr=2
1591 IF((dl-c2)*(dl+c3)-c1.LE.-1d-4) kontr=2
1592 IF(kontr.EQ.2) print 4000,ll,c
1595 IF(kontr.EQ.1) print 2000
1596 2000
FORMAT(
'TEST OF VAN DER MEE & HOVENIER IS SATISFIED')
1597 3000
FORMAT(
'TEST OF VAN DER MEE & HOVENIER IS NOT SATISFIED, L=',i3)
1598 4000
FORMAT(
'TEST OF VAN DER MEE & HOVENIER IS NOT SATISFIED, L=',i3,
1614 SUBROUTINE matr(A1,A2,A3,A4,B1,B2,LMAX,NPNA,F)
1616 IMPLICIT REAL*8 (a-h,o-z)
1617 real*8 a1(npl),a2(npl),a3(npl),a4(npl),b1(npl),b2(npl),
f(npna,4,4)
1626 1001
FORMAT(
' ',2x,
'S',6x,
'ALPHA1',6x,
'ALPHA2',6x,
'ALPHA3',
1627 & 6x,
'ALPHA4',7x,
'BETA1',7x,
'BETA2')
1630 print 1002,l,a1(l1),a2(l1),a3(l1),a4(l1),b1(l1),b2(l1)
1632 1002
FORMAT(
' ',i3,6f12.5)
1637 1003
FORMAT(
' ',5x,
'<',8x,
'F11',8x,
'F22',8x,
'F33',
1638 & 8x,
'F44',8x,
'F12',8x,
'F34')
1639 d6=dsqrt(6d0)*0.25d0
1655 pp2=0.25d0*(1d0+u)*(1d0+u)
1656 pp3=0.25d0*(1d0-u)*(1d0-u)
1664 IF(l.EQ.lmax)
GO TO 350
1666 p=(pl1*u*pp1-dl*p1)/dl1
1669 350
IF(l.LT.2)
GO TO 400
1670 f2=
f2+(a2(l1)+a3(l1))*pp2
1671 f3=
f3+(a2(l1)-a3(l1))*pp3
1674 IF(l.EQ.lmax)
GO TO 400
1676 pl3=dfloat(l1*(l*l-4))
1677 pl4=1d0/dfloat(l*(l1*l1-4))
1678 p=(pl1*(pl2-4d0)*pp2-pl3*p2)*pl4
1681 p=(pl1*(pl2+4d0)*pp3-pl3*p3)*pl4
1684 p=(pl1*u*pp4-dsqrt(dfloat(l*l-4))*p4)/dsqrt(dfloat(l1*l1-4))
1695 print 1004,tb,f11,f22,f33,f44,f12,f34
1714 1004
FORMAT(
' ',f6.2,6f11.4)