Output of file : DETORK.FOR contained in archive : FORTRN77.ZIP
SUBROUTINE DETORK(ITER,H,X,Y,DY,DDY,IFLAG)
C
C SUBROUTINE TO SOLVE THIRD-ORDER ORDINARY DIFFERENTIAL
C EQUATIONS Y''' = F(X,Y,Y',Y'') BY RUNGE-KUTTA METHOD.
C
DIMENSION X(1), Y(1), DY(1), DDY(1)
DO 1 I = 1,ITER-1
TKO = H*DY(I)
TNO = H*DDY(I)
TMO = H*YTRPRI(X(I),Y(I),DY(I),DDY(I),FLAG)
XN = X(I) + H/2.
YN = Y(I) + TKO/2.
DYN = DY(I) + TNO/2.
DDYN = DDY(I) + TMO/2.
TK1 = H*(DY(I) + TNO/2.)
TN1 = H*(DDY(I) + TMO/2.)
TM1 = H*YTRPRI(XN,YN,DYN,DDYN,IFLAG)
YN = Y(I) + TK1/2.
DYN = DY(I) + TN1/2.
DDYN = DDY(I) + TM1/2.
TK2 = H*(DY(I) + TN1/2.)
TN2 = H*(DDY(I) + TM1/2.)
TM2 = H*YTRPRI(XN,YN,DYN,DDYN,IFLAG)
XN = X(I) + H
YN = Y(I) + TK2
DYN = DY(I) + TN2
DDYN = DDY(I) + TM2
TK3 = H*(DY(I) + TN2)
TN3 = H*(DDY(I) + TM2)
TM3 = H*YTRPRI(XN,YN,DYN,DDYN,IFLAG)
DDY(I+1) = DDY(I)+(TMO+2.*TM1+2.*TM2+TM3)/6
DY(I+1) = DY(I) + (TNO+2.*TN1+2.*TN2+TN3)/6
Y(I+1) = Y(I) +(TKO+2.*TK1+2.*TK2+TK3)/6.
1 CONTINUE
RETURN
END


### 3 Responses to “Category : Miscellaneous Language Source CodeArchive   : FORTRN77.ZIPFilename : DETORK.FOR”

1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/