Basic HTML version of Foils prepared 22 February 1998
Foil 34 Runge Kutta Routine in Fortran90 - II
From Fox Presentation Fall 1995 CPS615 Basic Simulation Track for Computational Science -- 1998 Enhancements. by Geoffrey C. Fox
-
h2=.5*h ! h/2, for convenience
-
do k = 1, ns
-
Xdelta1=V
-
Vdelta1=Grav(X,M)
-
Xdelta2=V+h2*Vdelta1
-
Vdelta2=Grav (X+h2*Xdelta1, M)
-
Xdelta3=V+h2*Vdelta2
-
Vdelta3=Grav(X+h2*Xdelta2, M)
-
Xdelta4=V+h*Vdelta3
-
Vdelta4=Grav(X+h*Xdelta3,M)
-
X=X+h/6. (Xdelta1+2*(Xdelta2+Xdelta3)+Xdelta4)
-
V=V+h/6. (Vdelta1+2*(Vdelta2+Vdelta3)+Vdelta4)
-
end do
-
end subroutine runge-kutta
© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu
If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.
Page produced by wwwfoil on Sun Feb 22 1998