2 SUBROUTINE odeint(ystart1,nvar,x1,x2,eps,h1,hmin,nok,nbad)
5 INTEGER nbad,nok,nvar,KMAXX,MAXSTP,NMAX
7 DOUBLE PRECISION eps,h1,hmin,x1,x2,ystart1(nvar),TINY
8 parameter(maxstp=10000,nmax=50,kmaxx=200,tiny=1.e-30)
9 INTEGER i,kmax1,kount,nstp
10 DOUBLE PRECISION dxsav,h,hdid,hnext,x,xsav,dydx(nmax),&
11 xp(kmaxx),y(nmax),yp(nmax,kmaxx),yscal(nmax)
32 if (kmax1>0) xsav=x-2.*dxsav
37 yscal(i)=abs(y(i))+abs(h*dydx(i))+tiny
40 if(abs(x-xsav)>abs(dxsav))
then 51 if((x+h-x2)*(x+h-x1)>0.) h=x2-x
52 call rkqs(y,dydx,nvar,x,h,eps,yscal,hdid,hnext)
58 if((x-x2)*(x2-x1)>=0.)
then 71 if(abs(hnext)<hmin)
write(*,*)
'WARNING: stepsize smaller than minimum in odeint' 74 write(*,*)
'WARNING: too many steps in odeint' subroutine odeint(ystart1, nvar, x1, x2, eps, h1, hmin, nok, nbad)
subroutine rkqs(y, dydx, n, x, htry, eps, yscal, hdid, hnext)
subroutine source_population_eq(x, y, dydx)