[Fortran] 纯文本查看 复制代码
!3-DIMENSIONAL CELLULAR AUTOMATA SIMULATION FOR GRAIN GROWTH
MODULE INITIAL
IMPLICIT NONE
INTEGER,PARAMETER :: IR=500, JR=500,KR=500, CASTEPMAX=2000, IQ=128
INTEGER,PARAMETER :: STYLE_NEIGHBOR=26 !3D-Moore
INTEGER,PARAMETER :: GRIDSIZE=2,ITERATION=100 !um
INTEGER,DIMENSION(1:26):: STATE_N
INTEGER,DIMENSION(1:6):: number
INTEGER,DIMENSION(0:IR+1,0:JR+1,0:KR+1) :: STATE, STATE_1
CHARACTER(LEN=60),DIMENSION(1:16)::FILENAMES
REAL*8 :: AVERAGE6
END MODULE INITIAL
!************************************
PROGRAM GRAINGROWTH
USE DFLIB
USE MSFLIB
USE INITIAL
IMPLICIT NONE
!........time..........
INTEGER:: DATE_TIME(8), HOUR, MINUTE, SECOND
INTEGER:: TOTAL, NDIFF, MINUTESNEW
INTEGER:: HOUR1, MINUTE1, SECOND1,TOTAL1
INTEGER:: HOURS, MINUTES, SECONDS, TOTALS
!
INTEGER :: I,J,K,IX,IY,IZ,CASTEP, CASTEPOLD=iteration
INTEGER :: nne,L
INTEGER,DIMENSION(26):: in,jn,kn
INTEGER,DIMENSION(l:6):: number1
CHARACTER(LEN=60),DIMENSION(1:16)::filenames1
!.....................
INTEGER:: COLOR
!.....................
INTEGER :: NUM=0
INTEGER :: N_INDEX, NR ! 1-26 neighbor index
INTEGER :: NUM_OLD,NUM_NEW,E_OLD,E_NEW,DE ! energy
REAL ::X,X1,VAL,VAL1 ! random number
CHARACTER(len=80) :: Filesname
!******************************
!...........Calculate the time required for the program to run......