在第一个do 循环后面和第二个do循环后面设置断点,运行完第一个do前面读入的变量值都是对的,
为什么运行完第二个do之后,前面所有变量值都自动变了呢?太奇怪了,求助高手啊,非常感谢!
源程序截取的一部分如下,输入文件见附件,要读入的数据有点多,麻烦高手了,谢谢
PROGRAM FEM2D
DIMENSION IJK_ELE(500,3),X(500),Y(500),IJK_U(100,14),
& AK(2000,2000),
&THTA(10),ZKD(10),AL(10),CK(10),TX(10),TY(10),TZ(10)
OPEN(4,FILE='BASIC1.IN')
OPEN(5,FILE='NODE_ANSYS1.IN')
OPEN(6,FILE='ELEMENT_ANSYS1.IN')
READ(4,*) N_ELE,N_NODE,N_BC,N_LAYER,N_GAS,N_GAS2
CALL READ_IN(N_ELE,N_NODE,N_BC,N_BAND,E1,E2,G12,V12,G23,
& G31,IJI_ELE,X,Y,IJK_U,N_LAYER,THTA,ZKD,HD,XL,
& N_GAS,N_GAS2,AL,CK,TX,TY,TZ)
CLOSE(4)
CLOSE(5)
CLOSE(6)
END
c
c to get the original data in order to model the problem
SUBROUTINE READ_IN(N_ELE,N_NODE,N_BC,N_BAND,E1,E2,G12,V12,G23,
& G31,IJK_ELE,X,Y,IJK_U,N_LAYER,THTA,ZKD,HD,XL,
& N_GAS,N_GAS2,AL,CK,TX,TY,TZ)
DIMENSION IJK_ELE(N_ELE,3),X(N_NODE),Y(N_NODE),IJK_U(N_BC,14),
& NE_ANSYS(N_ELE,14),THTA(N_LAYER),ZKD(N_LAYER+1),
& AL(N_GAS2),CK(N_GAS),TX(N_GAS),TY(N_GAS),TZ(N_GAS2)
REAL ND_ANSYS(N_NODE,3)
READ(4,*)E1,E2,G12,G23,V12,G31,HD,XL
READ(4,*)(THTA(I),I=1,N_LAYER)
READ(4,*)(ZKD(I),I=1,N_LAYER+1)
READ(4,*)((IJK_U(I,J),J=1,14),I=1,N_BC)
READ(4,*)(AL(I),I=1,N_GAS2)
READ(4,*)(CK(J),J=1,N_GAS)
READ(4,*)(TX(K),K=1,N_GAS)
READ(4,*)(TY(K),K=1,N_GAS)
READ(4,*)(TZ(K),K=1,N_GAS2)
READ(5,*)((ND_ANSYS(I,J),J=1,3),I=1,N_NODE)
READ(6,*)((NE_ANSYS(I,J),J=1,14),I=1,N_ELE)
DO L=1,N_NODE
X(L)=ND_ANSYS(L,2)
Y(L)=ND_ANSYS(L,3)
ENDDO
DO MM=1,N_ELE
DO NN=1,3
IJK_ELE(MM,NN)=NE_ANSYS(MM,NN)
ENDDO
ENDDO
N_BAND=0
DO IE=1,N_ELE
DO I=1,3
DO J=1,3
IW=IABS(IJK_ELE(IE,I)-IJK_ELE(IE,J))
IF(N_BAND.LT.IW)N_BAND=IW
ENDDO
ENDDO
ENDDO
N_BAND=(N_BAND+1)*13
RETURN
END |