由买买提看人间百态

topics

全部话题 - 话题: nstep
(共0页)
s***e
发帖数: 911
1
来自主题: Science版 - 4-阶龙格库塔子程序
SUBROUTINE rkdumb(vstart,nvar,x1,x2,nstep,derivs)
INTEGER nstep,nvar,NMAX,NSTPMX
PARAMETER (NMAX=50,NSTPMX=200)
REAL x1,x2,vstart(nvar),xx(NSTPMX),y(NMAX,NSTPMX)
EXTERNAL derivs
COMMON /path/ xx,y
CU USES rk4
INTEGER i,k
REAL h,x,dv(NMAX),v(NMAX)
do 11 i=1,nvar
v(i)=vstart(i)
y(i,1)=v(i)
11 continue
xx(1)=x1
x=x1
h=(x2-x1)/nstep
do 13 k=1,nstep
call derivs(x,v,dv)
call rk4(v,dv,nva
(共0页)