PROGRAM RYB TEST C This program tests the coefficients calculated by the programs trntrx, C or trnrox. DOUBLE PRECISION DLAMDA(5),TEST1,TEST2,TEST3, RYBCOF(0:45450) DOUBLE PRECISION G2, G3, G2SUM, G3SUM DOUBLE PRECISION ZL, COEF, XL, XLP1 INTEGER J, ISTEP, IQ, MMIN, MMAX, M, NM ,MAXS CHARACTER*4 ID DATA DLAMDA/1.0D0,0.25D0,0.1D0,2.0D0,4.0D0/ WRITE(6,10) 10 FORMAT(1X,'TESTING ASYMPTOTIC EXPRESSIONS FOR COEFFICIENTS OF YB') OPEN(1,FILE='ryb300.dat',STATUS='OLD') READ(1,20)ID, MAXS 20 FORMAT(A4,I5) IF(ID.NE.' RYB') THEN WRITE(6,30) 30 FORMAT(1X,'WRONG COEFFICIENTS FOR RYB') STOP ENDIF READ(1,40)RYBCOF 40 FORMAT(D22.16) DO 200 J=1,5 WRITE(6,1000)DLAMDA(J) 1000 FORMAT(/1X,'LAMBDA =',F8.3) WRITE(6,100) 100 FORMAT(/2X,'M',5X,'COEF',8X,'T1=M*COEF',6X,'2*G2',3X, & 'T2=(M+2)(T1-2*G2)',2X,'T2+4*G3') C C The Gx are the functions g from Jeffrey & Onishi equn 5.6. IF(DLAMDA(J) .LE. 1) THEN XL=DLAMDA(J) XLP1=XL+1D0 G2=-XL*(4D0+XL)/(5D0*XLP1**2) G3=-(32D0-33D0*XL+83D0*XL**2+43D0*XL**3)/(250D0*XLP1**2) ISTEP=1 ELSE XL=1.0D0/DLAMDA(J) XLP1=XL+1D0 G2=-(4D0*XL+1D0)/(5D0*XLP1**2) G3=-(43D0+83D0*XL-33D0*XL**2+32D0*XL**3)/ & (250D0*XL*XLP1**2) ISTEP=-1 ENDIF MMIN=150 MMAX=300 G2SUM=2D0*G2 G3SUM=4D0*G3 DO 900 M=MMIN,MMAX IF (ISTEP .GT. 0) THEN NM = (M*(M+1))/2 ELSE NM = (M*(M+1))/2 +M ENDIF ZL=XLP1**(-M) COEF=0D0 DO 950 IQ=0,M COEF=COEF+RYBCOF(NM)*ZL NM=NM+ISTEP ZL=ZL*XL 950 CONTINUE TEST1=DBLE(M)*COEF TEST2=DBLE(M+2)*(TEST1-G2SUM) TEST3=TEST2+G3SUM WRITE(6,60) M,COEF,TEST1,G2SUM,TEST2,TEST3 60 FORMAT(1X,I3,6D13.5) 900 CONTINUE 200 CONTINUE 1100 FORMAT(F13.3,3F16.5) STOP END