[Fortran] 纯文本查看 复制代码
SUBROUTINE REMA(IJ,IK,II,NREF)
implicit real*8 (a-h,o-z)
COMMON NG,NM,NM1,NNG,NN,NMS,BA,BB,NSVC,NMG,NTCSC,NMGS
COMMON/COMC/NGIN(165),NGOUT(165),NMIN(420),NMOUT(420),NMM(420,3)
COMMON/COMD/BK(420),BK1(165),BK2(165),TA(165),TB(165),NPSS(10,10)
LPSS=1
LL=1
1 read(2,*) N1,N2,CA,TRA,CB,TRB
IF(N1.LT.0) THEN
LL=LL+1
IF(LL.LE.II) GOTO 1
NPSS(IJ,LPSS)=-1
RETURN
ENDIF
IF(TRA.EQ.0.0.and.TRB.EQ.0.0) GOTO 3
NG=NG+1
WRITE(3,605) NG,'G',N1+IK,N2+IK,CA,TRA,CB,TRB
605 FORMAT(I3,7X,A1,2I5,4F15.5)
TB(NG)=TRB
TRB=1.0/TRB
bk1(NG)=CA*TRB
bk2(NG)=CB*TRB
TA(NG)=TRA*TRB
NGIN(NG)=N1+IK
NGOUT(NG)=N2+IK
GOTO 1
3 NM=NM+1
WRITE(3,606) NM,'M',N1+IK,N2+IK,CA,TRA,CB,TRB
606 FORMAT(I6,4X,A1,2I5,4F15.5)
bk(NM)=CA
NMIN(NM)=N1+IK
NMOUT(NM)=N2+IK
NMM(NM,3)=0
IF(N1.EQ.17.AND.IJ.EQ.NREF) THEN
NM=NM-1
GOTO 1
ENDIF
IF(LL.EQ.II) THEN
NPSS(IJ,LPSS)=NM
LPSS=LPSS+1
ENDIF
GOTO 1
END
[Fortran] 纯文本查看 复制代码
10 CONTINUE
IF(KX.GT.KSX.AND.KY.GT.KSY) GOTO 70
IF(KX.LE.KSX) THEN
KXI=X(KX,2)
KXJ=X(KX,3)
ENDIF
IF(KY.LE.KSY) THEN
KYI=Y(KY,2)
KYJ=Y(KY,3)
ENDIF
KSZ=KSZ+1
IF(KSZ.EQ.M5) THEN
WRITE(*,*) ' KSZ=M5=',M5,KSX,KSY,' Increase M5(in plus)!'
STOP
ENDI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