[Fortran] 纯文本查看 复制代码
PROGRAM MAIN
DIMENSION C(5000),IA(1000),EK(36)
OPEN(5,FILE='IN.DAT')
OPEN(6,FILE='OUT.DAT',STATUS='UNKNOWN')
10 READ(5,*)NG
IF(NG.EQ.0) STOP
WRITE(6,15)
15 FORMAT(//,5X
& '************ PLANE PROBLEM ***********',/)
READ(5,*)NE,MC,NX,NB,ND,EO,VO,T
WRITE(6,20)NG,NE,MC,NX,NB,ND,EO,VO,T
20 FORMAT(//,10X,'NG=',I4,5X,'NE=',I4,5X,'MC=',I4,5X,'NX=',I4,/,
& 10X,'NB=',I4,5X,'ND=',I4,/,10X,'EO=',E10.4,5X,'VO=',F7.2,
& 5X,'T=',F7.2)
READ(5,*)NWA,NWE,NWK,NWP,NWD
WRITE(6,25)NWA,NWE,NWK,NWP,NWD
25 FORMAT(/10X,'NWA=',I2,3X,'NWE=',I2,3X,'NWK=',I2,3X,
& 'NWP=',I2,3X,'NWD=',I2)
NT=2*NG
M1=3*NE+1
M2=M1+2*NB
N1=2*NG+1
N2=N1+NB
N3=7*NE+N2
N4=N3+NT*ND
N5=N4+NT
NEND=N5
IF(NEND.LE.5000) GOTO 35
WRITE(*,*)'***EXCEED THE LIMIT OF ARRAY C(IN THE MIDDLE)!!***'
WRITE(*,30) NEND
30 FORMAT(/,'*******NEND=',I6,1X,'>5000********')
STOP 111
35 CALL INPUT(NE,NG,NB,IA(1),C(1),IA(M1),C(N1))
WRITE(*,40)
40 FORMAT(/10X,'##### INPUT PASSED ######')
IF(MC.EQ.0)GOTO 45
E=EO/(1.0-VO*VO)
V=VO/(1.0-VO)
GOTO 50
45 E=EO
V=VO
50 NX1=NX
A1=E/(1.0-V*V)/4.0
A2=0.5*(1.0-V)
CALL ABC(NE,NG,NWA,IA(1),C(1),C(N2))
WRITE(*,55)
55 FORMAT(/10X,'###### ABC PASSED ######')
DO 60 I=N3,N4
C(I)=0.0
60 CONTINUE
DO 65 K=1,NE
IO=K
CALL KE(IO,NE,NWE,T,A1,A2,V,EK(1),C(N2))
CALL SUMK(IO,NE,ND,NT,IA(1),C(N3),EK(1))
65 CONTINUE
WRITE(*,70)
70 FORMAT(/10X,'##### SUMK PASSED #####')
CALL CHECK(NT,ND,NWK,C(N3))
WRITE(*,75)
75 FORMAT(/10X,'##### CHECK PASSED #####')
80 READ(5,*)NF,NP
M3=M2+2*NF
N6=N5+NF
NEND=N6+NP-1
MEND=M3+2*NP-1
NM=0
IF(NEND.LE.5000)GOTO 85
WRITE(*,*)'***EXCEED THE LIMIT OF ARRAY C(AT THE END)!!***'
WRITE(*,30)NEND
NM=1
85 IF(MEND.LE.1000)GOTO 95
WRITE(*,*)'***EXCEED THE LIMIT OF ARRAY IA(AT THE END)!!***'
WRITE(*,90)MEND
90 FORMAT(/,'********MEND=',I6,1X,'>1000*******')
STOP 222
95 IF(NM.EQ.1)STOP 222
DO 100 I=N4,N5
C(I)=0.0
100 CONTINUE
IF(NF.GT.0)CALL PF(NF,NP,NT,NWP,C(N4),IA(M2),C(N5))
WRITE(*,105)
105 FORMAT(/10X,'##### PF PASSED #####')
IF(NP.GT.0)CALL PP(NP,NT,NG,NWP,C(1),C(N4),IA(M3),C(N6))
WRITE(*,110)
110 FORMAT(/10X,'##### PP PASSED #####')
CALL DBC(NT,ND,NB,NX,NX1,C(N3),C(N4),IA(M1),C(N1))
WRITE(*,115)
115 FORMAT(/10X,'##### DBC PASSED #####')
CALL GAUSS(NT,ND,NWD,NX,NX1,C(N3),C(N4))
WRITE(*,120)
120 FORMAT(/10X,'##### GAUSS PASSED #####')
CALL STRESS(NE,NT,A1,A2,V,IA(1),C(N2),C(N4))
WRITE(*,125)
125 FORMAT(/10X,'#####STRESS PASSED #####')
NX1=NX1-1
IF(NX1.GT.0)GOTO 80
GOTO 10
END