[問題] 新手請教~"~
首先 我先寫了一個副程式
SUBROUTINE IDMAT(NFIX,IDND,NDN,NNOD,NEQ)
.
.
.
DO I=1,NNOD
DO J=1,NDN
.
.
.
IDND(J,I)=xxx
.
.
.
END DO
END DO
WRITE(*,*) IDND
^^^^這個IDND矩陣的值有跑出來,沒問題
接下來我要再寫一個副程式
SUBROUTINE MEMDOF(IDBC,NDN,NDE,NBC,NNOD,IDND,LM)
IMPLICIT REAL*8 (A-H,O-Z)
IMPLICIT INTEGER*4 (I-N)
INTEGER*4 IDBC(5,NBC),IDND(NDN,NNOD),LM(NDE,NBC),NDN,NNOD,NDE,NBC
WRITE(*,*) IDND
^^^^我想去測試有沒有辦法讀到上面副程式所寫的IDND
但結果顯示讀不出東西,請問為什麼呢???
---------------------------------------------------------------
Sorry 附上部份主程式...
PROGRAM
IMPLICIT REAL*8 (A-H,O-Z)
IMPLICIT INTEGER*4 (I-N)
REAL*8 A(200000)
INTEGER*4 MAXMEM,IEND,IRI
INTEGER*4 NNOD,NBC,NMAT,NSEC,ITP,NNE,IFORCE
INTEGER*4 ICOOR,IVECTY,INFIX,IEXLD,IPROP,ISECT,IIDBC,IIDND,IFEF
INTEGER*4 ILM,IGLOAD,IGLK,IDISP,IELFOR
.
.
.
C
C Compute pointers for the input arrays
C
ICOOR = 1
INFIX = ICOOR + NCO*NNOD
IEXLD = INFIX +(NDN*NNOD+IRI-1)/IRI
IIDBC = IEXLD +NDN*NNOD
IVECTY = IIDBC+(5*NBC+IRI-1)/IRI
IF (ITP .EQ. 6) THEN
IFEF = IVECTY+ 3*NBC
ELSE
IFEF = IVECTY
ENDIF
IF (IFORCE .EQ. 1) IPROP=IFEF
IF (IFORCE .EQ. 2) IPROP=IFEF+NDE*NBC
ISECT =IPROP+5*NMAT
IEND =ISECT+5*NSEC
C
C Memory check
C
PLACE='INPUT'
CALL MEMCHECK(IEND,MAXMEM,PLACE)
C
C Read the remaining data
C
CALL INPUT(A(ICOOR),A(INFIX),A(IEXLD),A(IIDBC),A(IVECTY),A(IFEF),
1 A(IPROP),A(ISECT),NNOD,NBC,NMAT,NSEC,ITP,NCO,NDN,NDE,
2 IFORCE)
CLOSE(UNIT=1)
C***** UP TO HERE --- PROG 1 *****
IIDND = IEND
IEND = IIDND +(NDN*NNOD+IRI-1)/IRI
C
PLACE='IDMAT'
CALL MEMCHECK(IEND,MAXMEM,PLACE)
CALL IDMAT(A(INFIX),A(IIDND),NDN,NNOD,NEQ)
C Compute LM(NDE,NBC)
ILM = IEND
IEND = ILM+(NDE*NBC+IRI-1)/IRI
C
PLACE='MEMDOF'
CALL MEMCHECK(IEND,MAXMEM,PLACE)
C
CALL MEMDOF(A(IIDBC),A(IIDND),A(ILM),NBC,NDE,NDN,NNOD)
.
.
.
end
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.112.217.19
→
10/31 06:17, , 1F
10/31 06:17, 1F
※ 編輯: RuinGgg 來自: 125.233.1.90 (11/01 01:40)
→
11/02 22:13, , 2F
11/02 22:13, 2F
→
11/03 01:10, , 3F
11/03 01:10, 3F
→
11/03 01:10, , 4F
11/03 01:10, 4F
→
11/03 16:18, , 5F
11/03 16:18, 5F
Fortran 近期熱門文章
PTT數位生活區 即時熱門文章