24小时热门版块排行榜    

CyRhmU.jpeg
查看: 1336  |  回复: 1

szcfxxx

银虫 (小有名气)

[交流] 我用“dimension"定义了数组,可是调试提示我没有声明此数组。

DIMENSION EELAS(6), EELASP(3),BBAR(6), BBARP(3), BBARN(3, 3),
1 DISTGR(3,3), GRF(3,3)
PARAMETER(ZERO=0.D0, ONE=1.D0, TWO=2.D0, THREE=3.D0, FOUR=4.D0,
1 SIX=6.D0)
C----------------------------------------------------------------------------------------------
C------------------------------------------------------------------------------------------------
EMOD=PROPS(1)
ENU=PROPS(2)
LAME1=EMOD*ENU/((1+ENU)*(1-2*ENU))
LAME2=0.5*EMOD/(1+ENU)
C----------------------------------------------------------------------------------------------
C JACOBIAN OR DET
DET=DFGRD1(1, 1)*DFGRD1(2, 2)*DFGRD1(3, 3)
1 -DFGRD1(1, 2)*DFGRD1(2, 1)*DFGRD1(3, 3)
IF(NSHR.EQ.3) THEN
DET=DET+DFGRD1(1, 2)*DFGRD1(2, 3)*DFGRD1(3, 1)
1 +DFGRD1(1, 3)*DFGRD1(3, 2)*DFGRD1(2, 1)
2 -DFGRD1(1, 3)*DFGRD1(3,1)*DFGRD1(2, 2)
3 -DFGRD1(2, 3)*DFGRD1(3, 2)*DFGRD1(1, 1)
END IF
C-------------------------------------------------------------------------------------------------
C CALCULATE THE GROWTH FACTOR
IF TIME(1)=1 THEN
STATEV(NTENS+1)=1.0005
GR0=STATEV(NTENS+1)
GO TO 110

GR0=STATEV(NTENS+1)
AB=DET/GR0**3
IF (AB.LE.1.0) THEN
STATEV(NTENS+1)=GR0
GO TO 110
END IF
C----------------------------------------------------------------------
EPS=1.0E-08
CALL DNEWT(GR0,EPS,RES,L)
IF (L.NE.0) THEN
WRITE(*,10) GR0
STATEV(NTENS+1) =GR0
END IF
10 FORMAT(001X,'GR0=',E15.6)
END
C-----------------------------------------------------------------------
C CALCULATE GROTH TENSOR
110 DO K1=1,3
DO K2=1,3
GRF(K1,K2)=0
END DO
END DO
DO K3=1,3
GRF(K3,K3)=GR0
END DO
C---------------------------------------------------------------------------
C CALCULATE ELASTIC TENSOR
SCALE=ONE/GR0
DO K1=1, 3
DO K2=1, 3
DISTGR(K2,K1)=SCALE*DFGRD1(K2,K1)
END DO
END DO
C----------------------------------------------------------------------------
C------------------------------------------------------------------------------
BBAR(1)=DISTGR(1, 1)**2+DISTGR(1, 2)**2+DISTGR(1, 3)**2
BBAR(2)=DISTGR(2, 1)**2+DISTGR(2, 2)**2+DISTGR(2, 3)**2
BBAR(3)=DISTGR(3, 3)**2+DISTGR(3, 1)**2+DISTGR(3, 2)**2
BBAR(4)=DISTGR(1, 1)*DISTGR(2, 1)+DISTGR(1, 2)*DISTGR(2, 2)
1 +DISTGR(1, 3)*DISTGR(2, 3)
IF(NSHR.EQ.3) THEN
BBAR(5)=DISTGR(1, 1)*DISTGR(3, 1)+DISTGR(1, 2)*DISTGR(3, 2)
1 +DISTGR(1, 3)*DISTGR(3, 3)
BBAR(6)=DISTGR(2, 1)*DISTGR(3, 1)+DISTGR(2, 2)*DISTGR(3, 2)
1 +DISTGR(2, 3)*DISTGR(3, 3)


可是调试的时候老提示
1>G:\Fortran\Console22\Console22\Source1.for(70): error #6410: This name has not been declared as an array or a function. [GRF]
1>G:\Fortran\Console22\Console22\Source1.for(74): error #6410: This name has not been declared as an array or a function. [GRF]
1>G:\Fortran\Console22\Console22\Source1.for(81): error #6410: This name has not been declared as an array or a function. [DISTGR]
1>G:\Fortran\Console22\Console22\Source1.for(86): error #6410: This name has not been declared as an array or a function. [BBAR]
1>G:\Fortran\Console22\Console22\Source1.for(87): error #6410: This name has not been declared as an array or a function. [BBAR]
1>G:\Fortran\Console22\Console22\Source1.for(88): error #6410: This name has not been declared as an array or a function. [BBAR]
1>G:\Fortran\Console22\Console22\Source1.for(89): error #6410: This name has not been declared as an array or a function. [BBAR]
1>G:\Fortran\Console22\Console22\Source1.for(92): error #6410: This name has not been declared as an array or a function. [BBAR]
1>G:\Fortran\Console22\Console22\Source1.for(94): error #6410: This name has not been declared as an array or a function. [BBAR]
1>G:\Fortran\Console22\Console22\Source1.for(102): error #6410: This name has not been declared as an array or a function. [STRESS]
1>G:\Fortran\Console22\Console22\Source1.for(105): error #6410: This name has not been declared as an array or a function. [STRESS]
回复此楼
心亦阑珊
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

szcfxxx

银虫 (小有名气)

知道了,程序中间多了个END,使得主子程序结束了,因此声明的数组在下面不能使用了。
心亦阑珊
2楼2015-05-03 10:03:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 szcfxxx 的主题更新
普通表情 高级回复(可上传附件)
信息提示
请填处理意见