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, ALPHA, BETA, FM, SZ)
362 IMPLICIT REAL*8 (a-h,o-z)
363 include
'tm_tmd.par.f'
364 real*8 reff(npnax),veff(npnax),cextin(npnax)
365 real*8 cscat(npnax),walb(npnax),asymm(npnax)
366 real*8 alpha(4,npl,npnax),beta(2,npl,npnax),fm(6,npna,npnax),sz(npnax
393 real*8 lam,mrr,mri,x(npng2),w(npng2),s(npng2),ss(npng2),
394 * an(npn1),r(npng2),dr(npng2),
395 * ddr(npng2),drr(npng2),dri(npng2),ann(npn1,npn1)
396 real*8 xg(1000),wg(1000),tr1(npn2,npn2),ti1(npn2,npn2),
397 & alph1(npl),alph2(npl),alph3(npl),alph4(npl),bet1(npl),
398 & bet2(npl),xg1(2000),wg1(2000),
399 & al1(npl),al2(npl),al3(npl),al4(npl),be1(npl),be2(npl)
401 & rt11(npn6,npn4,npn4),rt12(npn6,npn4,npn4),
402 & rt21(npn6,npn4,npn4),rt22(npn6,npn4,npn4),
403 & it11(npn6,npn4,npn4),it12(npn6,npn4,npn4),
404 & it21(npn6,npn4,npn4),it22(npn6,npn4,npn4)
408 COMMON /tmat/ rt11,rt12,rt21,rt22,it11,it12,it21,it22
450 IF (np.EQ.-1.OR.np.EQ.-2) ncheck=1
451 IF (np.GT.0.AND.(-1)**np.EQ.1) ncheck=1
452 WRITE (6,5454) ncheck
453 5454
FORMAT (
'NCHECK=',i1)
455 IF (
abs(rat-1d0).GT.1d-8.AND.np.EQ.-1)
CALL sarea (eps,rat)
456 if (
abs(rat-1d0).GT.1d-8.AND.np.GE.0)
CALL surfch(np,eps,rat)
457 IF (
abs(rat-1d0).GT.1d-8.AND.np.EQ.-2)
CALL sareac (eps,rat)
459 8000
FORMAT (
'RAT=',f8.6)
460 IF(np.EQ.-1.AND.eps.GE.1d0) print 7000,eps
461 IF(np.EQ.-1.AND.eps.LT.1d0) print 7001,eps
462 IF(np.GE.0) print 7100,np,eps
463 IF(np.EQ.-2.AND.eps.GE.1d0) print 7150,eps
464 IF(np.EQ.-2.AND.eps.LT.1d0) print 7151,eps
465 print 7400, lam,mrr,mri
467 7000
FORMAT(
'RANDOMLY ORIENTED OBLATE SPHEROIDS, A/B=',f11.7)
468 7001
FORMAT(
'RANDOMLY ORIENTED PROLATE SPHEROIDS, A/B=',f11.7)
469 7100
FORMAT(
'RANDOMLY ORIENTED CHEBYSHEV PARTICLES, T',
471 7150
FORMAT(
'RANDOMLY ORIENTED OBLATE CYLINDERS, D/L=',f11.7)
472 7151
FORMAT(
'RANDOMLY ORIENTED PROLATE CYLINDERS, D/L=',f11.7)
473 7200
FORMAT (
'ACCURACY OF COMPUTATIONS DDELT = ',d8.2)
474 7400
FORMAT(
'LAM=',f10.6,3x,
'MRR=',d10.4,3x,
'MRI=',d10.4)
477 axi=axmax-dax*dfloat(iax-1)
481 nk=int(axi*nkmax/axmax+2)
482 IF (nk.GT.1000) print 8001,nk
483 IF (nk.GT.1000)
RETURN
484 IF (ndistr.EQ.3)
CALL power (axi,b,r1,r2)
485 8001
FORMAT (
'NK=',i4,
' I.E., IS GREATER THAN 1000. ',
486 &
'EXECUTION TERMINATED.')
487 CALL gauss (nk,0,0,xg,wg)
491 IF (ndistr.EQ.5)
GO TO 3
507 4
CALL distrb (nk,xg1,wg1,ndistr,axi,b,gam,r1,r2,
508 & reff(iax),veff(iax),p)
510 8002
FORMAT(
'R1=',f10.6,
' R2=',f10.6)
511 IF (
abs(rat-1d0).LE.1d-6) print 8003, reff(iax),veff(iax)
512 IF (
abs(rat-1d0).GT.1d-6) print 8004, reff(iax),veff(iax)
513 8003
FORMAT(
'EQUAL-VOLUME-SPHERE REFF=',f8.4,
' VEFF=',f7.4)
514 8004
FORMAT(
'EQUAL-SURFACE-AREA-SPHERE REFF=',f8.4,
517 7250
FORMAT(
'NUMBER OF GAUSSIAN QUADRATURE POINTS ',
518 &
'IN SIZE AVERAGING =',i4)
540 ixxx=xev+4.05d0*xev**0.333333d0
542 IF (inm1.GE.npn1)
THEN
543 print 7333, inm1, npn1, a
553 7333
FORMAT(
'INM1 (',i3,
') is greater than NPN1 (',i3,
') for radius ',d8
560 IF (ngauss.GT.npng1)
THEN
561 print 7340, ngauss, npng1, a
571 7340
FORMAT(
'NGAUSS (',i3,
') is greater than NPNG1 (',i3,
') for radius '
572 7334
FORMAT(
' NMAX =', i3,
' DC2 =',d8.2,
' DC1 =',d8.2)
573 7335
FORMAT(
' NMAX1 =', i3,
' DC2 =',d8.2,
' DC1 =',d8.2)
574 CALL const(ngauss,nmax,mmax,p,x,w,an,ann,s,ss,np,eps)
575 CALL vary(lam,mrr,mri,a,eps,np,ngauss,x,p,ppi,pir,pii,r,
576 & dr,ddr,drr,dri,nmax)
577 CALL tmatr0 (ngauss,x,w,an,ann,s,ss,ppi,pir,pii,r,dr,
578 & ddr,drr,dri,nmax,ncheck)
588 qsca=qsca+dn1*(tr1nn*tr1nn+ti1nn*ti1nn
589 & +tr1nn1*tr1nn1+ti1nn1*ti1nn1)
590 qext=qext+(tr1nn+tr1nn1)*dn1
592 dsca=
abs((qsca1-qsca)/qsca)
593 dext=
abs((qext1-qext)/qext)
597 nmin=dfloat(nmax)/2d0+1d0
605 dqsca=dn1*(tr1nn*tr1nn+ti1nn*ti1nn
606 & +tr1nn1*tr1nn1+ti1nn1*ti1nn1)
607 dqext=(tr1nn+tr1nn1)*dn1
608 dqsca=
abs(dqsca/qsca)
609 dqext=
abs(dqext/qext)
611 IF (dqsca.LE.ddelt.AND.dqext.LE.ddelt)
GO TO 12
615 IF(dsca.LE.ddelt.AND.dext.LE.ddelt)
GO TO 55
616 IF (nma.EQ.npn1)
THEN
617 print 7333, nma, npn1, a
629 IF (ngauss.GE.npng1)
THEN
630 print 7336, ngauss, npng1, a
631 print 7337, ng, dsca, dext
642 DO 150 ngaus=nnnggg,npng1
645 7336
FORMAT(
'NGAUSS (',i3,
') is greater than NPNG1 (',i3,
') for size '
646 7337
FORMAT(
' NG = ',i3,
' DSCA = ',d8.2,
' DEXT = ',d8.2)
647 CALL const(ngauss,nmax,mmax,p,x,w,an,ann,s,ss,np,eps)
648 CALL vary(lam,mrr,mri,a,eps,np,ngauss,x,p,ppi,pir,pii,r,
649 & dr,ddr,drr,dri,nmax)
650 CALL tmatr0 (ngauss,x,w,an,ann,s,ss,ppi,pir,pii,r,dr,
651 & ddr,drr,dri,nmax,ncheck)
661 qsca=qsca+dn1*(tr1nn*tr1nn+ti1nn*ti1nn
662 & +tr1nn1*tr1nn1+ti1nn1*ti1nn1)
663 qext=qext+(tr1nn+tr1nn1)*dn1
665 dsca=
abs((qsca1-qsca)/qsca)
666 dext=
abs((qext1-qext)/qext)
670 IF(dsca.LE.ddelt.AND.dext.LE.ddelt)
GOTO 155
671 IF (ngaus.GE.npng1)
THEN
672 print 7336, ngaus, npng1, a
673 print 7337, nggg, dsca, dext
691 IF (nmax1.GE.npn4)
THEN
692 print 7550, nmax1, npn4, a
702 7550
FORMAT (
'NMAX1 (',i3,
') is greater than NPN4 (',i3,
') for radius '
703 IF (nmax1.GT.npn4)
RETURN
724 qsca=qsca+zz1*zz1+zz2*zz2+zz3*zz3+zz4*zz4
725 & +zz5*zz5+zz6*zz6+zz7*zz7+zz8*zz8
729 CALL tmatr(m,ngauss,x,w,an,ann,s,ss,ppi,pir,pii,r,dr,
730 & ddr,drr,dri,nmax,ncheck)
757 qsc=qsc+(zz1*zz1+zz2*zz2+zz3*zz3+zz4*zz4
758 & +zz5*zz5+zz6*zz6+zz7*zz7+zz8*zz8)*2d0
768 7800
FORMAT(
' m = ',i3,
' qxt = ',d12.6,
' qsc = ',d12.6,
771 coeff1=lam*lam*0.5d0/p
775 7880
FORMAT (
'nmax=',i3,
' nmax1=',i3)
776 CALL gsp (nmax1,csca,lam,al1,al2,al3,al4,be1,be2,lmax)
782 alph1(l1)=alph1(l1)+al1(l1)*wgi
783 alph2(l1)=alph2(l1)+al2(l1)*wgi
784 alph3(l1)=alph3(l1)+al3(l1)*wgi
785 alph4(l1)=alph4(l1)+al4(l1)*wgi
786 bet1(l1)=bet1(l1)+be1(l1)*wgi
787 bet2(l1)=bet2(l1)+be2(l1)*wgi
789 cscat(iax)=cscat(iax)+wgi
790 cextin(iax)=cextin(iax)+cext*wgii
795 alph1(l1)=alph1(l1)/cscat(iax)
796 alph2(l1)=alph2(l1)/cscat(iax)
797 alph3(l1)=alph3(l1)/cscat(iax)
798 alph4(l1)=alph4(l1)/cscat(iax)
799 bet1(l1)=bet1(l1)/cscat(iax)
800 bet2(l1)=bet2(l1)/cscat(iax)
801 alpha(1,l1,iax)=alph1(l1)
802 alpha(2,l1,iax)=alph2(l1)
803 alpha(3,l1,iax)=alph3(l1)
804 alpha(4,l1,iax)=alph4(l1)
805 beta(1,l1,iax)=bet1(l1)
806 beta(2,l1,iax)=bet2(l1)
808 walb(iax)=cscat(iax)/cextin(iax)
809 CALL hovenr(l1max,alph1,alph2,alph3,alph4,bet1,bet2)
810 asymm(iax)=alph1(2)/3d0
811 print 9100,cextin(iax),cscat(iax),walb(iax),asymm(iax)
812 9100
FORMAT(
'CEXT=',d12.6,2x,
'CSCA=',d12.6,2x,
813 & 2x,
'W=',d12.6,2x,
'<COS>=',d12.6)
814 IF (walb(iax).GT.1d0) print 9111
815 9111
FORMAT (
'WARNING: W IS GREATER THAN 1')
816 WRITE (10,580) walb(iax),l1max
818 WRITE (10,575) alph1(l),alph2(l),alph3(l),alph4(l),
824 CALL matr (alph1,alph2,alph3,alph4,bet1,bet2,lmax,npna,npnax,iax
827 time=dfloat(itime)/6000d0
829 1001
FORMAT (
' time =',f8.2,
' min')
853 SUBROUTINE const (NGAUSS,NMAX,MMAX,P,X,W,AN,ANN,S,SS,NP,EPS)
854 IMPLICIT REAL*8 (a-h,o-z)
855 include
'tm_tmd.par.f'
856 real*8 x(npng2),w(npng2),x1(npng1),w1(npng1),
857 * x2(npng1),w2(npng1),
858 * s(npng2),ss(npng2),
859 * an(npn1),ann(npn1,npn1),dd(npn1)
864 d=dsqrt(dfloat(2*n+1)/dfloat(nn))
872 IF (np.EQ.-2)
GO TO 11
873 CALL gauss(ng,0,0,x,w)
875 11 ng1=dfloat(ngauss)/2d0
878 CALL gauss(ng1,0,0,x1,w1)
879 CALL gauss(ng2,0,0,x2,w2)
881 w(i)=0.5d0*(xx+1d0)*w1(i)
882 x(i)=0.5d0*(xx+1d0)*x1(i)+0.5d0*(xx-1d0)
885 w(i+ng1)=-0.5d0*xx*w2(i)
886 x(i+ng1)=-0.5d0*xx*x2(i)+0.5d0*xx
931 SUBROUTINE vary (LAM,MRR,MRI,A,EPS,NP,NGAUSS,X,P,PPI,PIR,PII,
932 * R,DR,DDR,DRR,DRI,NMAX)
933 include
'tm_tmd.par.f'
934 IMPLICIT REAL*8 (a-h,o-z)
935 real*8 x(npng2),r(npng2),dr(npng2),mrr,mri,lam,
936 * z(npng2),zr(npng2),zi(npng2),
937 * j(npng2,npn1),y(npng2,npn1),jr(npng2,npn1),
938 * ji(npng2,npn1),dj(npng2,npn1),
939 * djr(npng2,npn1),dji(npng2,npn1),ddr(npng2),
940 * drr(npng2),dri(npng2),
942 COMMON /cbess/ j,y,jr,ji,dj,dy,djr,dji
944 IF (np.EQ.-1)
CALL rsp1(x,ng,ngauss,a,eps,np,r,dr)
945 IF (np.GE.0)
CALL rsp2(x,ng,a,eps,np,r,dr)
946 IF (np.EQ.-2)
CALL rsp3(x,ng,ngauss,a,eps,r,dr)
951 v=1d0/(mrr*mrr+mri*mri)
969 IF (nmax.GT.npn1) print 9000,nmax,npn1
970 IF (nmax.GT.npn1) stop
971 9000
FORMAT(
' NMAX = ',i2,
', i.e., greater than ',i3)
972 tb=ta*dsqrt(mrr*mrr+mri*mri)
973 tb=dmax1(tb,dfloat(nmax))
974 nnmax1=1.2d0*dsqrt(dmax1(ta,dfloat(nmax)))+3d0
975 nnmax2=(tb+4d0*(tb**0.33333d0)+1.2d0*dsqrt(tb))
977 CALL bess(z,zr,zi,ng,nmax,nnmax1,nnmax2)
993 SUBROUTINE rsp1 (X,NG,NGAUSS,REV,EPS,NP,R,DR)
994 IMPLICIT REAL*8 (a-h,o-z)
995 real*8 x(ng),r(ng),dr(ng)
1026 SUBROUTINE rsp2 (X,NG,REV,EPS,N,R,DR)
1027 IMPLICIT REAL*8 (a-h,o-z)
1028 real*8 x(ng),r(ng),dr(ng)
1033 a=1d0+1.5d0*ep*(dn4-2d0)/(dn4-1d0)
1036 IF (i.EQ.n) a=a-3d0*eps*(1d0+0.25d0*ep)/
1037 * (dn-1d0)-0.25d0*ep*eps/(9d0*dn-1d0)
1038 r0=rev*a**(-1d0/3d0)
1041 ri=r0*(1d0+eps*dcos(xi))
1043 dr(i)=-r0*eps*dnp*dsin(xi)/ri
1060 SUBROUTINE rsp3 (X,NG,NGAUSS,REV,EPS,R,DR)
1061 IMPLICIT REAL*8 (a-h,o-z)
1062 real*8 x(ng),r(ng),dr(ng)
1063 h=rev*( (2d0/(3d0*eps*eps))**(1d0/3d0) )
1068 IF (si/co.GT.a/h)
GO TO 20
1105 SUBROUTINE bess (X,XR,XI,NG,NMAX,NNMAX1,NNMAX2)
1106 include
'tm_tmd.par.f'
1107 IMPLICIT REAL*8 (a-h,o-z)
1108 real*8 x(ng),xr(ng),xi(ng),
1109 * j(npng2,npn1),y(npng2,npn1),jr(npng2,npn1),
1110 * ji(npng2,npn1),dj(npng2,npn1),dy(npng2,npn1),
1111 * djr(npng2,npn1),dji(npng2,npn1),
1112 * aj(npn1),ay(npn1),ajr(npn1),aji(npn1),
1113 * adj(npn1),ady(npn1),adjr(npn1),
1115 COMMON /cbess/ j,y,jr,ji,dj,dy,djr,dji
1119 CALL rjb(xx,aj,adj,nmax,nnmax1)
1120 CALL ryb(xx,ay,ady,nmax)
1123 CALL cjb(yr,yi,ajr,aji,adjr,adji,nmax,nnmax2)
1146 SUBROUTINE rjb(X,Y,U,NMAX,NNMAX)
1147 IMPLICIT REAL*8 (a-h,o-z)
1148 real*8 y(nmax),u(nmax),z(800)
1151 z(l)=1d0/(dfloat(2*l+1)*xx)
1155 z(i1)=1d0/(dfloat(2*i1+1)*xx-z(i1+1))
1165 u(i)=yi1-dfloat(i)*yi*xx
1179 SUBROUTINE ryb(X,Y,V,NMAX)
1180 IMPLICIT REAL*8 (a-h,o-z)
1181 real*8 y(nmax),v(nmax)
1189 y(2)=(-3d0*x3+x1)*c-3d0*x2*s
1192 5 y(i+1)=dfloat(2*i+1)*x1*y(i)-y(i-1)
1195 10 v(i)=y(i-1)-dfloat(i)*x1*y(i)
1208 SUBROUTINE cjb (XR,XI,YR,YI,UR,UI,NMAX,NNMAX)
1209 include
'tm_tmd.par.f'
1210 IMPLICIT REAL*8 (a-h,o-z)
1211 real*8 yr(nmax),yi(nmax),ur(nmax),ui(nmax)
1212 real*8 cyr(npn1),cyi(npn1),czr(1200),czi(1200),
1213 * cur(npn1),cui(npn1)
1215 xrxi=1d0/(xr*xr+xi*xi)
1218 qf=1d0/dfloat(2*l+1)
1225 ar=qf*cxxr-czr(i1+1)
1226 ai=qf*cxxi-czi(i1+1)
1227 ari=1d0/(ar*ar+ai*ai)
1233 ari=1d0/(ar*ar+ai*ai)
1236 cr=dcos(xr)*dcosh(xi)
1237 ci=-dsin(xr)*dsinh(xi)
1240 cy0r=ar*cxxr-ai*cxxi
1241 cy0i=ai*cxxr+ar*cxxi
1242 cy1r=cy0r*czr(1)-cy0i*czi(1)
1243 cy1i=cy0i*czr(1)+cy0r*czi(1)
1244 ar=cy1r*cxxr-cy1i*cxxi
1245 ai=cy1i*cxxr+cy1r*cxxi
1260 cyir=cyi1r*czr(i)-cyi1i*czi(i)
1261 cyii=cyi1i*czr(i)+cyi1r*czi(i)
1262 ar=cyir*cxxr-cyii*cxxi
1263 ai=cyii*cxxr+cyir*cxxi
1289 SUBROUTINE tmatr0 (NGAUSS,X,W,AN,ANN,S,SS,PPI,PIR,PII,R,DR,DDR,
1290 * DRR,DRI,NMAX,NCHECK)
1291 include
'tm_tmd.par.f'
1292 IMPLICIT REAL*8 (a-h,o-z)
1293 real*8 x(npng2),w(npng2),an(npn1),s(npng2),ss(npng2),
1294 * r(npng2),dr(npng2),sig(npn2),
1295 * j(npng2,npn1),y(npng2,npn1),
1296 * jr(npng2,npn1),ji(npng2,npn1),dj(npng2,npn1),
1297 * dy(npng2,npn1),djr(npng2,npn1),
1298 * dji(npng2,npn1),ddr(npng2),drr(npng2),
1299 * d1(npng2,npn1),d2(npng2,npn1),
1300 * dri(npng2),ds(npng2),dss(npng2),rr(npng2),
1301 * dv1(npn1),dv2(npn1)
1303 real*8 r11(npn1,npn1),r12(npn1,npn1),
1304 * r21(npn1,npn1),r22(npn1,npn1),
1305 * i11(npn1,npn1),i12(npn1,npn1),
1306 * i21(npn1,npn1),i22(npn1,npn1),
1307 * rg11(npn1,npn1),rg12(npn1,npn1),
1308 * rg21(npn1,npn1),rg22(npn1,npn1),
1309 * ig11(npn1,npn1),ig12(npn1,npn1),
1310 * ig21(npn1,npn1),ig22(npn1,npn1),
1312 * qr(npn2,npn2),qi(npn2,npn2),
1313 * rgqr(npn2,npn2),rgqi(npn2,npn2),
1314 * tqr(npn2,npn2),tqi(npn2,npn2),
1315 * trgqr(npn2,npn2),trgqi(npn2,npn2)
1316 real*8 tr1(npn2,npn2),ti1(npn2,npn2)
1317 real*4 plus(npn6*npn4*npn4*8)
1319 & r11,r12,r21,r22,i11,i12,i21,i22,rg11,rg12,rg21,rg22,
1320 & ig11,ig12,ig21,ig22
1321 COMMON /cbess/ j,y,jr,ji,dj,dy,djr,dji
1323 COMMON /ctt/ qr,qi,rgqr,rgqi
1329 IF (ncheck.EQ.1)
THEN
1343 CALL vig ( x(i1), nmax, 0, dv1, dv2)
1369 IF (ncheck.EQ.1.AND.sig(n1+n2).LT.0d0)
GO TO 205
1413 c5r=c1r*drri-c1i*drii
1414 c5i=c1i*drri+c1r*drii
1415 b5r=b1r*drri-b1i*drii
1416 b5i=b1i*drri+b1r*drii
1423 ar12=ar12+
f1*b2r+
f2*b3r
1424 ai12=ai12+
f1*b2i+
f2*b3i
1425 gr12=gr12+
f1*c2r+
f2*c3r
1426 gi12=gi12+
f1*c2i+
f2*c3i
1429 ar21=ar21+
f1*b4r+
f2*b5r
1430 ai21=ai21+
f1*b4i+
f2*b5i
1431 gr21=gr21+
f1*c4r+
f2*c5r
1432 gi21=gi21+
f1*c4i+
f2*c5i
1435 205 an12=ann(n1,n2)*factor
1436 r12(n1,n2)=ar12*an12
1437 r21(n1,n2)=ar21*an12
1438 i12(n1,n2)=ai12*an12
1439 i21(n1,n2)=ai21*an12
1440 rg12(n1,n2)=gr12*an12
1441 rg21(n1,n2)=gr21*an12
1442 ig12(n1,n2)=gi12*an12
1443 ig21(n1,n2)=gi21*an12
1468 tqr(k1,k2)=tpir*tar21-tpii*tai21+tppi*tar12
1469 tqi(k1,k2)=tpir*tai21+tpii*tar21+tppi*tai12
1470 trgqr(k1,k2)=tpir*tgr21-tpii*tgi21+tppi*tgr12
1471 trgqi(k1,k2)=tpir*tgi21+tpii*tgr21+tppi*tgi12
1483 tqr(kk1,kk2)=tpir*tar12-tpii*tai12+tppi*tar21
1484 tqi(kk1,kk2)=tpir*tai12+tpii*tar12+tppi*tai21
1485 trgqr(kk1,kk2)=tpir*tgr12-tpii*tgi12+tppi*tgr21
1486 trgqi(kk1,kk2)=tpir*tgi12+tpii*tgr12+tppi*tgi21
1492 qr(n1,n2)=tqr(n1,n2)
1493 qi(n1,n2)=tqi(n1,n2)
1494 rgqr(n1,n2)=trgqr(n1,n2)
1495 rgqi(n1,n2)=trgqi(n1,n2)
1497 CALL tt(nmax,ncheck)
1530 SUBROUTINE tmatr (M,NGAUSS,X,W,AN,ANN,S,SS,PPI,PIR,PII,R,DR,DDR,
1531 * DRR,DRI,NMAX,NCHECK)
1532 include
'tm_tmd.par.f'
1533 IMPLICIT REAL*8 (a-h,o-z)
1534 real*8 x(npng2),w(npng2),an(npn1),s(npng2),ss(npng2),
1535 * r(npng2),dr(npng2),sig(npn2),
1536 * j(npng2,npn1),y(npng2,npn1),
1537 * jr(npng2,npn1),ji(npng2,npn1),dj(npng2,npn1),
1538 * dy(npng2,npn1),djr(npng2,npn1),
1539 * dji(npng2,npn1),ddr(npng2),drr(npng2),
1540 * d1(npng2,npn1),d2(npng2,npn1),
1541 * dri(npng2),ds(npng2),dss(npng2),rr(npng2),
1542 * dv1(npn1),dv2(npn1)
1544 real*8 r11(npn1,npn1),r12(npn1,npn1),
1545 * r21(npn1,npn1),r22(npn1,npn1),
1546 * i11(npn1,npn1),i12(npn1,npn1),
1547 * i21(npn1,npn1),i22(npn1,npn1),
1548 * rg11(npn1,npn1),rg12(npn1,npn1),
1549 * rg21(npn1,npn1),rg22(npn1,npn1),
1550 * ig11(npn1,npn1),ig12(npn1,npn1),
1551 * ig21(npn1,npn1),ig22(npn1,npn1),
1553 * qr(npn2,npn2),qi(npn2,npn2),
1554 * rgqr(npn2,npn2),rgqi(npn2,npn2),
1555 * tqr(npn2,npn2),tqi(npn2,npn2),
1556 * trgqr(npn2,npn2),trgqi(npn2,npn2)
1557 real*8 tr1(npn2,npn2),ti1(npn2,npn2)
1558 real*4 plus(npn6*npn4*npn4*8)
1560 & r11,r12,r21,r22,i11,i12,i21,i22,rg11,rg12,rg21,rg22,
1561 & ig11,ig12,ig21,ig22
1562 COMMON /cbess/ j,y,jr,ji,dj,dy,djr,dji
1564 COMMON /ctt/ qr,qi,rgqr,rgqi
1571 IF (ncheck.EQ.1)
THEN
1586 CALL vig (x(i1),nmax,m,dv1,dv2)
1668 c5r=c1r*drri-c1i*drii
1669 c5i=c1i*drri+c1r*drii
1670 b5r=b1r*drri-b1i*drii
1671 b5i=b1i*drri+b1r*drii
1683 c8r=c2r*drri-c2i*drii
1684 c8i=c2i*drri+c2r*drii
1685 b8r=b2r*drri-b2i*drii
1686 b8i=b2i*drri+b2r*drii
1693 IF (ncheck.EQ.1.AND.si.GT.0d0)
GO TO 150
1700 IF (ncheck.EQ.1)
GO TO 160
1704 ar12=ar12+
f1*b2r+
f2*b3r
1705 ai12=ai12+
f1*b2i+
f2*b3i
1706 gr12=gr12+
f1*c2r+
f2*c3r
1707 gi12=gi12+
f1*c2i+
f2*c3i
1710 ar21=ar21+
f1*b4r+
f2*b5r
1711 ai21=ai21+
f1*b4i+
f2*b5i
1712 gr21=gr21+
f1*c4r+
f2*c5r
1713 gi21=gi21+
f1*c4i+
f2*c5i
1714 IF (ncheck.EQ.1)
GO TO 200
1719 ar22=ar22+e1*b6r+e2*b7r+e3*b8r
1720 ai22=ai22+e1*b6i+e2*b7i+e3*b8i
1721 gr22=gr22+e1*c6r+e2*c7r+e3*c8r
1722 gi22=gi22+e1*c6i+e2*c7i+e3*c8i
1724 an12=ann(n1,n2)*factor
1725 r11(n1,n2)=ar11*an12
1726 r12(n1,n2)=ar12*an12
1727 r21(n1,n2)=ar21*an12
1728 r22(n1,n2)=ar22*an12
1729 i11(n1,n2)=ai11*an12
1730 i12(n1,n2)=ai12*an12
1731 i21(n1,n2)=ai21*an12
1732 i22(n1,n2)=ai22*an12
1733 rg11(n1,n2)=gr11*an12
1734 rg12(n1,n2)=gr12*an12
1735 rg21(n1,n2)=gr21*an12
1736 rg22(n1,n2)=gr22*an12
1737 ig11(n1,n2)=gi11*an12
1738 ig12(n1,n2)=gi12*an12
1739 ig21(n1,n2)=gi21*an12
1740 ig22(n1,n2)=gi22*an12
1774 tqr(k1,k2)=tpir*tar21-tpii*tai21+tppi*tar12
1775 tqi(k1,k2)=tpir*tai21+tpii*tar21+tppi*tai12
1776 trgqr(k1,k2)=tpir*tgr21-tpii*tgi21+tppi*tgr12
1777 trgqi(k1,k2)=tpir*tgi21+tpii*tgr21+tppi*tgi12
1779 tqr(k1,kk2)=tpir*tar11-tpii*tai11+tppi*tar22
1780 tqi(k1,kk2)=tpir*tai11+tpii*tar11+tppi*tai22
1781 trgqr(k1,kk2)=tpir*tgr11-tpii*tgi11+tppi*tgr22
1782 trgqi(k1,kk2)=tpir*tgi11+tpii*tgr11+tppi*tgi22
1784 tqr(kk1,k2)=tpir*tar22-tpii*tai22+tppi*tar11
1785 tqi(kk1,k2)=tpir*tai22+tpii*tar22+tppi*tai11
1786 trgqr(kk1,k2)=tpir*tgr22-tpii*tgi22+tppi*tgr11
1787 trgqi(kk1,k2)=tpir*tgi22+tpii*tgr22+tppi*tgi11
1789 tqr(kk1,kk2)=tpir*tar12-tpii*tai12+tppi*tar21
1790 tqi(kk1,kk2)=tpir*tai12+tpii*tar12+tppi*tai21
1791 trgqr(kk1,kk2)=tpir*tgr12-tpii*tgi12+tppi*tgr21
1792 trgqi(kk1,kk2)=tpir*tgi12+tpii*tgr12+tppi*tgi21
1798 qr(n1,n2)=tqr(n1,n2)
1799 qi(n1,n2)=tqi(n1,n2)
1800 rgqr(n1,n2)=trgqr(n1,n2)
1801 rgqi(n1,n2)=trgqi(n1,n2)
1818 SUBROUTINE vig (X, NMAX, M, DV1, DV2)
1819 include
'tm_tmd.par.f'
1820 IMPLICIT REAL*8 (a-h,o-z)
1821 real*8 dv1(npn1),dv2(npn1)
1830 IF (m.NE.0)
GO TO 20
1837 d3=(qn2*x*d2-qn*d1)/qn1
1838 der=qs1*(qn1*qn/qn2)*(-d1+d3)
1848 a=a*dsqrt(dfloat(i2-1)/dfloat(i2))*qs
1856 qnm=dsqrt(qn*qn-qmm)
1857 qnm1=dsqrt(qn1*qn1-qmm)
1858 d3=(qn2*x*d2-qnm*d1)/qnm1
1859 der=qs1*(-qn1*qnm*d1+qn*qnm1*d3)/qn2
1877 SUBROUTINE tt(NMAX,NCHECK)
1878 include
'tm_tmd.par.f'
1879 IMPLICIT REAL*8 (a-h,o-z)
1880 real*8
f(npn2,npn2),b(npn2),work(npn2),
1881 * qr(npn2,npn2),qi(npn2,npn2),
1882 * rgqr(npn2,npn2),rgqi(npn2,npn2),
1883 * a(npn2,npn2),c(npn2,npn2),d(npn2,npn2),e(npn2,npn2)
1884 real*8 tr1(npn2,npn2),ti1(npn2,npn2)
1885 COMPLEX*16 ZQ(NPN2,NPN2),ZW(NPN2)
1886 INTEGER IPIV(NPN2),IPVT(NPN2)
1888 COMMON /CTT/ QR,QI,RGQR,RGQI
1896 zq(i,j)=dcmplx(qr(i,j),qi(i,j))
1900 CALL zgetrf(nnmax,nnmax,zq,npn2,ipiv,info)
1901 IF (info.NE.0)
WRITE (6,1100) info
1902 CALL zgetri(nnmax,zq,npn2,ipiv,zw,npn2,info)
1903 IF (info.NE.0)
WRITE (6,1100) info
1905 1100
FORMAT (
'WARNING: info=', i2)
1945 SUBROUTINE gsp(NMAX,CSCA,LAM,ALF1,ALF2,ALF3,ALF4,BET1,BET2,LMAX)
1946 include
'tm_tmd.par.f'
1947 IMPLICIT REAL*8 (a-b,d-h,o-z),
COMPLEX*16 (C)
1948 REAL*8 LAM,SSIGN(900)
1949 REAL*8 CSCA,SSI(NPL),SSJ(NPN1),
1950 & alf1(npl),alf2(npl),alf3(npl),
1951 & alf4(npl),bet1(npl),bet2(npl),
1952 & tr1(npl1,npn4),tr2(npl1,npn4),
1953 & ti1(npl1,npn4),ti2(npl1,npn4),
1954 & g1(npl1,npn6),g2(npl1,npn6),
1955 & ar1(npn4),ar2(npn4),ai1(npn4),ai2(npn4),
1956 & fr(npn4,npn4),fi(npn4,npn4),ff(npn4,npn4)
1957 real*4 b1r(npl1,npl1,npn4),b1i(npl1,npl1,npn4),
1958 & b2r(npl1,npl1,npn4),b2i(npl1,npl1,npn4),
1959 & d1(npl1,npn4,npn4),d2(npl1,npn4,npn4),
1960 & d3(npl1,npn4,npn4),d4(npl1,npn4,npn4),
1961 & d5r(npl1,npn4,npn4),d5i(npl1,npn4,npn4),
1962 & plus1(npn6*npn4*npn4*8)
1964 & tr11(npn6,npn4,npn4),tr12(npn6,npn4,npn4),
1965 & tr21(npn6,npn4,npn4),tr22(npn6,npn4,npn4),
1966 & ti11(npn6,npn4,npn4),ti12(npn6,npn4,npn4),
1967 & ti21(npn6,npn4,npn4),ti22(npn6,npn4,npn4)
1968 COMPLEX*16 CIM(NPN1)
1970 COMMON /TMAT/ TR11,TR12,TR21,TR22,TI11,TI12,TI21,TI22
1971 COMMON /CBESS/ B1R,B1I,B2R,B2I
1973 equivalence( plus1(1),tr11(1,1,1) )
1974 equivalence(d1(1,1,1),plus1(1)),
1975 & (d2(1,1,1),plus1(npl1*npn4*npn4+1)),
1976 & (d3(1,1,1),plus1(npl1*npn4*npn4*2+1)),
1977 & (d4(1,1,1),plus1(npl1*npn4*npn4*3+1)),
1978 & (d5r(1,1,1),plus1(npl1*npn4*npn4*4+1))
1994 IF(i.LE.nmax) ssj(i)=dsqrt(si)
2020 3300
FORMAT (
' B1 AND B2')
2068 CALL ccg(n,n1,nmax,k1,k2,g1)
2069 nnmax=min0(nmax,n1+n)
2070 nnmin=max0(1,iabs(n-n1))
2072 DO 15 nn=nnmin,nnmax
2075 m1max=min0(n,nn)+npn6
2089 rr1=rr1+tr1(m2,nn)*sig
2090 ri1=ri1+ti1(m2,nn)*sig
2091 rr2=rr2+tr2(m2,nn)*sig
2092 ri2=ri2+ti2(m2,nn)*sig
2093 12 aar1=aar1+sss*rr1
2100 ar1(nn)=aar1*xr-aai1*xi
2101 ai1(nn)=aar1*xi+aai1*xr
2102 ar2(nn)=aar2*xr-aai2*xi
2103 ai2(nn)=aar2*xi+aai2*xr
2108 CALL ccg(n,n1,nmax,k3,k4,g2)
2113 DO 30 m1=m1min,m1max
2118 DO 25 nn=nnmin,nnmax
2121 bbr1=bbr1+sss*ar1(nn)
2122 bbi1=bbi1+sss*ai1(nn)
2123 bbr2=bbr2+sss*ar2(nn)
2124 bbi2=bbi2+sss*ai2(nn)
2139 3301
FORMAT(
' D1, D2, ...')
2145 nn1max=nmax1+min0(n,nn)
2146 DO 180 m1=m1min,m1max
2151 DO 150 nn1=nn1min,nn1max
2161 dd1=dd1+xx*(x1*x3+x2*x4)
2162 dd2=dd2+xx*(x5*x7+x6*x8)
2171 DO 186 m1=m1min,m1max
2179 DO 183 nn1=nn1min,nn1max
2189 dd3=dd3+xx*(x1*x5+x2*x6)
2190 dd4=dd4+xx*(x3*x7+x4*x8)
2191 dd5r=dd5r+xx*(x3*x5+x4*x6)
2192 dd5i=dd5i+xx*(x4*x5-x3*x6)
2207 3303
FORMAT (
' G1, G2, ...')
2209 dk=lam*lam/(4d0*csca*dacos(-1d0))
2220 nnmin=max0(1,iabs(n-l))
2221 nnmax=min0(nmax,n+l)
2222 IF(nnmax.LT.nnmin)
GO TO 290
2223 CALL ccg(n,l,nmax,k1,k2,g1)
2224 IF(l.GE.2)
CALL ccg(n,l,nmax,k5,k6,g2)
2226 DO 280 nn=nnmin,nnmax
2234 DO 270 m1=m1min,m1max
2236 IF(m.GE.0) sss1=g1(m1,nnn)
2237 IF(m.LT.0) sss1=g1(npn6-m,nnn)*si
2238 dm1=dm1+sss1*d1(m1,nn,n)
2239 dm2=dm2+sss1*d2(m1,nn,n)
2242 sss=g1(npn6+1,nnn)*ffn
2245 IF(l.LT.2)
GO TO 280
2254 DO 275 m1=m1min,m1max
2257 dm3=dm3+sss1*d3(m1,nn,n)
2258 dm4=dm4+sss1*d4(m1,nn,n)
2259 dm5r=dm5r+sss1*d5r(m1,nn,n)
2260 dm5i=dm5i+sss1*d5i(m1,nn,n)
2264 sss=g2(npn4,nnn)*ffn
2282 IF(
abs(g1l).LT.1d-6)
GO TO 500
2300 f(i)=
f(i1)+0.5d0*dlog(dfloat(i1))
2315 ssign(n)=-ssign(n-1)
2340 SUBROUTINE ccg(N,N1,NMAX,K1,K2,GG)
2341 include
'tm_tmd.par.f'
2342 IMPLICIT REAL*8 (a-h,o-z)
2343 real*8 gg(npl1,npn6),cd(0:npn5),cu(0:npn5)
2348 &
and.n.LE.nmax)
GO TO 1
2351 5001
FORMAT(
' ERROR IN SUBROUTINE CCG')
2352 1 nnf=min0(n+n1,nmax)
2355 IF(k1.EQ.1.AND.k2.EQ.0)
min=npn6
2360 IF(iabs(m1).GT.n1)
GO TO 90
2361 nnl=max0(iabs(mm),iabs(n-n1))
2362 IF(nnl.GT.nnf)
GO TO 90
2365 IF (nnu.EQ.nnl) nnm=nnl
2366 CALL ccgin(n,n1,m,mm,c)
2368 IF (nnl.EQ.nnf)
GO TO 50
2371 DO 7 nn=nnl+1,min0(nnm,nnf)
2372 a=dfloat((nn+mm)*(nn-mm)*(n1-n+nn))
2373 a=a*dfloat((n-n1+nn)*(n+n1-nn+1)*(n+n1+nn+1))
2375 a=a*dfloat((2*nn+1)*(2*nn-1))
2377 b=0.5d0*dfloat(m-m1)
2380 b=dfloat(2*nn*(nn-1))
2381 b=dfloat((2*m-mm)*nn*(nn-1)-mm*n*(n+1)+
2383 d=dfloat(4*(nn-1)*(nn-1))
2384 d=d*dfloat((2*nn-3)*(2*nn-1))
2385 d=dfloat((nn-mm-1)*(nn+mm-1)*(n1-n+nn-1))/d
2386 d=d*dfloat((n-n1+nn-1)*(n+n1-nn+2)*(n+n1+nn))
2393 IF (nnf.LE.nnm)
GO TO 50
2394 CALL direct(n,m,n1,m1,nnu,mm,c)
2396 IF (nnu.EQ.nnm+1)
GO TO 50
2399 DO 12 nn=nnu-1,nnm+1,-1
2400 a=dfloat((nn-mm+1)*(nn+mm+1)*(n1-n+nn+1))
2401 a=a*dfloat((n-n1+nn+1)*(n+n1-nn)*(n+n1+nn+2))
2402 a=dfloat(4*(nn+1)*(nn+1))/a
2403 a=a*dfloat((2*nn+1)*(2*nn+3))
2405 b=dfloat(2*(nn+2)*(nn+1))
2406 b=dfloat((2*m-mm)*(nn+2)*(nn+1)-mm*n*(n+1)
2408 d=dfloat(4*(nn+2)*(nn+2))
2409 d=d*dfloat((2*nn+5)*(2*nn+3))
2410 d=dfloat((nn+mm+2)*(nn-mm+2)*(n1-n+nn+2))/d
2411 d=d*dfloat((n-n1+nn+2)*(n+n1-nn-1)*(n+n1+nn+3))
2419 IF (nn.LE.nnm) gg(mind,nn+1)=cu(nn)
2420 IF (nn.GT.nnm) gg(mind,nn+1)=cd(nn)
2430 SUBROUTINE direct (N,M,N1,M1,NN,MM,C)
2431 IMPLICIT REAL*8 (a-h,o-z)
2434 c=
f(2*n+1)+
f(2*n1+1)+
f(n+n1+m+m1+1)+
f(n+n1-m-m1+1)
2435 c=c-
f(2*(n+n1)+1)-
f(n+m+1)-
f(n-m+1)-
f(n1+m1+1)-
f(n1-m1+1)
2449 SUBROUTINE ccgin(N,N1,M,MM,G)
2450 IMPLICIT REAL*8 (a-h,o-z)
2451 real*8
f(900),ssign(900)
2456 &
and.n1.GE.iabs(m1).
2457 &
and.iabs(mm).LE.(n+n1))
GO TO 1
2460 5001
FORMAT(
' ERROR IN SUBROUTINE CCGIN')
2461 1
IF (iabs(mm).GT.iabs(n-n1))
GO TO 100
2465 IF(n1.LE.n)
GO TO 50
2477 & *dexp(
f(n+m+1)+
f(n-m+1)+
f(n12+1)+
f(n2-n12+2)-
f(n2+2)
2478 & -
f(n1+m1+1)-
f(n1-m1+1)-
f(n-n1+mm+1)-
f(n-n1-mm+1))
2486 IF(mm.GE.0)
GO TO 150
2491 150 g=a*ssign(n+m+1)
2492 & *dexp(
f(2*mm+2)+
f(n+n1-mm+1)+
f(n+m+1)+
f(n1+m1+1)
2493 & -
f(n+n1+mm+2)-
f(n-n1+mm+1)-
f(-n+n1+mm+1)-
f(n-m+1)
2502 SUBROUTINE sarea (D,RAT)
2503 IMPLICIT REAL*8 (a-h,o-z)
2504 IF (d.GE.1)
GO TO 10
2506 r=0.5d0*(d**(2d0/3d0) + d**(-1d0/3d0)*dasin(e)/e)
2510 10 e=dsqrt(1d0-1d0/(d*d))
2511 r=0.25d0*(2d0*d**(2d0/3d0) + d**(-4d0/3d0)*dlog((1d0+e)/(1d0-e))
2520 SUBROUTINE surfch (N,E,RAT)
2521 IMPLICIT REAL*8 (a-h,o-z)
2527 CALL gauss (ng,0,0,x,w)
2540 s=s+w(i)*a*dsqrt(a2+ens*ens)
2541 v=v+w(i)*(ds*a+xi*ens)*ds*a2
2544 rv=(v*3d0/4d0)**(1d0/3d0)
2551 SUBROUTINE sareac (EPS,RAT)
2552 IMPLICIT REAL*8 (a-h,o-z)
2553 rat=(1.5d0/eps)**(1d0/3d0)
2554 rat=rat/dsqrt( (eps+2d0)/(2d0*eps) )
2563 SUBROUTINE power (A,B,R1,R2)
2564 IMPLICIT REAL*8 (a-h,o-z)
2578 DOUBLE PRECISION FUNCTION zeroin (AX,BX,F,TOL)
2579 IMPLICIT REAL*8 (a-h,o-z)
2583 IF (tol1.GT.1d0)
GO TO 10
2592 30
IF (
abs(fc).GE.
abs(fb))
GO TO 40
2599 40 tol1=2d0*eps*
abs(b)+0.5d0*tol
2601 IF (
abs(xm).LE.tol1)
GO TO 90
2602 44
IF (fb.EQ.0d0)
GO TO 90
2603 45
IF (
abs(e).LT.tol1)
GO TO 70
2604 46
IF (
abs(fa).LE.
abs(fb))
GO TO 70
2605 47
IF (a.NE.c)
GO TO 50
2613 p=s*(2d0*xm*q*(q-r)-(b-a)*(r-1d0))
2614 q=(q-1d0)*(r-1d0)*(s-1d0)
2615 60
IF (p.GT.0d0) q=-q
2617 IF ((2d0*p).GE.(3d0*xm*q-
abs(tol1*q)))
GO TO 70
2618 64
IF (p.GE.
abs(0.5d0*e*q))
GO TO 70
2626 IF (
abs(d).GT.tol1) b=b+d
2627 IF (
abs(d).LE.tol1) b=b+dsign(tol1,xm)
2629 IF ((fb*(fc/
abs(fc))).GT.0d0)
GO TO 20
2637 DOUBLE PRECISION FUNCTION f(R1)
2638 IMPLICIT REAL*8 (a-h,o-z)
2641 f=(r2-r1)/dlog(r2/r1)-a
2654 SUBROUTINE gauss ( N,IND1,IND2,Z,W )
2655 IMPLICIT REAL*8 (a-h,p-z)
2665 IF(i.EQ.1) x=a-b/((
f+a)*
f)
2666 IF(i.EQ.2) x=(z(n)-a)*4d0+z(n)
2667 IF(i.EQ.3) x=(z(n-1)-z(n))*1.6d0+z(n-1)
2668 IF(i.GT.3) x=(z(m+1)-z(m+2))*c+z(m+3)
2669 IF(i.EQ.k.AND.ind.EQ.1) x=0d0
2674 IF (niter.LE.100)
GO TO 15
2682 20 pc=x*pb+(x*pb-pa)*(dj-a)/dj
2686 IF(dabs(pb).GT.check*dabs(x))
GO TO 10
2689 IF(ind1.EQ.0) w(m)=b*w(m)
2690 IF(i.EQ.k.AND.ind.EQ.1)
GO TO 100
2694 IF(ind2.NE.1)
GO TO 110
2696 1100
FORMAT(
' *** POINTS AND WEIGHTS OF GAUSSIAN QUADRATURE FORMULA',
2697 *
' OF ',i4,
'-TH ORDER')
2700 105 print 1200,i,zz,i,w(i)
2701 1200
FORMAT(
' ',4x,
'X(',i4,
') = ',f17.14,5x,
'W(',i4,
') = ',f17.14)
2705 1300
FORMAT(
' GAUSSIAN QUADRATURE FORMULA OF ',i4,
'-TH ORDER IS USED')
2707 IF(ind1.EQ.0)
GO TO 140
2716 SUBROUTINE distrb (NNK,YY,WY,NDISTR,AA,BB,GAM,R1,R2,REFF,
2718 IMPLICIT REAL*8 (a-h,o-z)
2719 real*8 yy(nnk),wy(nnk)
2720 IF (ndistr.EQ.2)
GO TO 100
2721 IF (ndistr.EQ.3)
GO TO 200
2722 IF (ndistr.EQ.4)
GO TO 300
2723 IF (ndistr.EQ.5)
GO TO 360
2724 print 1001,aa,bb,gam
2725 1001
FORMAT(
'MODIFIED GAMMA DISTRIBUTION, alpha=',f6.4,
' r_c=',
2726 & f6.4,
' gamma=',f6.4)
2733 y=y*dexp(-a2*(x**gam))
2737 100 print 1002,aa,bb
2738 1002
FORMAT(
'LOG-NORMAL DISTRIBUTION, r_g=',f8.4,
2739 &
' [ln(sigma_g)]**2=', f6.4)
2744 y=dexp(-y*y*0.5d0/bb)/x
2749 1003
FORMAT(
'POWER LAW DISTRIBUTION OF HANSEN & TRAVIS 1974')
2755 300 print 1004,aa,bb
2756 1004
FORMAT (
'GAMMA DISTRIBUTION, a=',f6.3,
' b=',f6.4)
2761 x=(x**b2)*dexp(-x*dab)
2766 1005
FORMAT (
'MODIFIED POWER LAW DISTRIBUTION, alpha=',d10.4)
2769 IF (x.LE.r1) wy(i)=wy(i)
2770 IF (x.GT.r1) wy(i)=wy(i)*(x/r1)**bb
2789 reff=reff+x*x*x*wy(i)
2796 veff=veff+xi*xi*x*x*wy(i)
2798 veff=veff/(g*reff*reff)
2804 SUBROUTINE hovenr(L1,A1,A2,A3,A4,B1,B2)
2805 IMPLICIT REAL*8 (a-h,o-z)
2806 real*8 a1(l1),a2(l1),a3(l1),a4(l1),b1(l1),b2(l1)
2810 dl=dfloat(ll)*2d0+1d0
2818 IF(ll.GE.1.AND.
abs(aa1).GE.dl) kontr=2
2819 IF(
abs(aa2).GE.dl) kontr=2
2820 IF(
abs(aa3).GE.dl) kontr=2
2821 IF(
abs(aa4).GE.dl) kontr=2
2822 IF(
abs(bb1).GE.ddl) kontr=2
2823 IF(
abs(bb2).GE.ddl) kontr=2
2824 IF(kontr.EQ.2) print 3000,ll
2832 IF((dl-c*aa1)*(dl-c*aa2)-cc*bb1*bb1.LE.-1d-4) kontr=2
2833 IF((dl-c2)*(dl-c3)+c1.LE.-1d-4) kontr=2
2834 IF((dl+c2)*(dl-c3)-c1.LE.-1d-4) kontr=2
2835 IF((dl-c2)*(dl+c3)-c1.LE.-1d-4) kontr=2
2836 IF(kontr.EQ.2) print 4000,ll,c
2840 2000
FORMAT(
'TEST OF VAN DER MEE & HOVENIER IS SATISFIED')
2841 3000
FORMAT(
'TEST OF VAN DER MEE & HOVENIER IS NOT SATISFIED, L=',i3)
2842 4000
FORMAT(
'TEST OF VAN DER MEE & HOVENIER IS NOT SATISFIED, L=',i3,
2858 SUBROUTINE matr(A1,A2,A3,A4,B1,B2,LMAX,NPNA,NPNAX,IAX,FM)
2859 include
'tm_tmd.par.f'
2860 IMPLICIT REAL*8 (a-h,o-z)
2861 real*8 a1(npl),a2(npl),a3(npl),a4(npl),b1(npl),b2(npl),fm(6,npna,npnax
2870 1001
FORMAT(
' ',2x,
'S',6x,
'ALPHA1',6x,
'ALPHA2',6x,
'ALPHA3',
2871 & 6x,
'ALPHA4',7x,
'BETA1',7x,
'BETA2')
2876 1002
FORMAT(
' ',i3,6f12.5)
2881 1003
FORMAT(
' ',5x,
'<',8x,
'F11',8x,
'F22',8x,
'F33',
2882 & 8x,
'F44',8x,
'F12',8x,
'F34')
2883 d6=dsqrt(6d0)*0.25d0
2899 pp2=0.25d0*(1d0+u)*(1d0+u)
2900 pp3=0.25d0*(1d0-u)*(1d0-u)
2908 IF(l.EQ.lmax)
GO TO 350
2910 p=(pl1*u*pp1-dl*p1)/dl1
2913 350
IF(l.LT.2)
GO TO 400
2914 f2=
f2+(a2(l1)+a3(l1))*pp2
2915 f3=
f3+(a2(l1)-a3(l1))*pp3
2918 IF(l.EQ.lmax)
GO TO 400
2920 pl3=dfloat(l1*(l*l-4))
2921 pl4=1d0/dfloat(l*(l1*l1-4))
2922 p=(pl1*(pl2-4d0)*pp2-pl3*p2)*pl4
2925 p=(pl1*(pl2+4d0)*pp3-pl3*p3)*pl4
2928 p=(pl1*u*pp4-dsqrt(dfloat(l*l-4))*p4)/dsqrt(dfloat(l1*l1-4))
2939 print 1004,tb,f11,f22,f33,f44,f12,f34
2948 1004
FORMAT(
' ',f6.2,6f11.4)