登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
PROGRAM SURFACESLIDER DIMENSION S(361),R(121),H(361,121) COMMON /COM1/DS,DR,H0 DATA N,M,PI,H0/361,121,3.1415926,0.05/ OPEN(9,FILE='FILM.DAT',STATUS='UNKNOWN') CALL SUBH(N,M,S,R,H) CALL OUTPUT(N,M,S,R,H) STOP END SUBROUTINE SUBH(N,M,S,R,H) DIMENSION s(N),R(M),H(N,M) COMMON /COM1/DS,DR,H0 PI=3.1415926 H0=0.05 s_min=0 s_max=2*PI r_min=80 r_max=100 DS=(s_max-s_min)/(N-1.0) DR=(r_max-r_min)/(M-1.0) DO I=1,N S=S_MIN+(I-1)*DS H(I,:)=S ENDDO DO J=1,M R=R_MIN+(J-1)*DR H(:,J)=R ENDDO DO J=1,80 H(I,J)=0 enddo DO J=80,M H(I,J)=H0 ENDDO RETURN END SUBROUTINE OUTPUT(N,M,s,r,H) DIMENSION s(N),r(M),H(N,M) COMMON /COM1/Ds,Dr,H0 WRITE(9,40)R(1),(R(J),J=1,M) DO I=1,N WRITE(9,40)S(I),(H(I,J),J=1,M) ENDDO 40 FORMAT(122(E12.6,1X)) STOP END |