PROGRAM RAY DEM C This program demonstrates the use of the coefficients calculated C by the programs trntrx. The program will produce a table of values C for different values of lambda as set in the DATA statements. C DOUBLE PRECISION DLAMDA(7),RAY,RAY11,RAY12,RAY21,RAY22 INTEGER J DATA DLAMDA/1D0,.5D0,.25D0,.2D0,.125D0,.1D0,2D0/ WRITE(6,5) 5 FORMAT(1X, &'RESISTANCE FUNCTIONS RAY from Jeffrey & Onishi,1982, J.F.M.,') WRITE(6,7) 7 FORMAT(1X,'VOL. 139, p261') WRITE(6,8) 8 FORMAT(1X, &'Table for the Functions RAY for 0.1 from Jeffrey & Onishi. IF(I.EQ.1) THEN G2=4D0*(2D0*XL+XL**2+2D0*XL**3)/(15D0*XLP1**3) G3=2D0*(16D0-45D0*XL+58D0*XL**2-45D0*XL**3+16D0*XL**4) & /(375D0*XLP1**3) ISTEP=1 ELSE G2=4D0*(2D0+XL+2D0*XL**2)/(15D0*XLP1**3) G3=2D0*(16D0-45D0*XL+58D0*XL**2-45D0*XL**3+16D0*XL**4) & /(375D0*XL*XLP1**3) ISTEP=-1 ENDIF IF(I.EQ.J) THEN RAY=1D0-G3 MMIN=2 MMAX=MAXS ELSE RAY=2D0*(G2*DLOG(2D0)-G3) MMIN=1 MMAX=MAXS-1 ENDIF G2SUM=2D0*G2 G3SUM=4D0*G3 DO 100 M=MMIN,MMAX,2 IF (ISTEP.GT.0) THEN NM = (M*(M+1))/2 ELSE NM = (M*(M+1))/2 +M ENDIF ZL=XLP1**(-M) COEF=0D0 DO 50 IQ=0,M COEF=COEF+RYACOF(NM)*ZL NM=NM+ISTEP ZL=ZL*XL 50 CONTINUE RAY=RAY+COEF-(G2SUM-G3SUM/DBLE(M+2))/DBLE(M) 100 CONTINUE IF(I.EQ.J)RETURN RAY=-RAY*2D0/XLP1 IF(I.EQ.2)RAY=RAY*XL RETURN END