! $Id: rk3_2n.f,v 1.5 2000/09/24 19:29:41 aake Exp $ !************************************************************************ SUBROUTINE timestep ! ! 3rd order, 2-N storage Runge-Kutta. ! !------------------------------------------------------------------------ include 'cparam.inc' include 'cdata.inc' include 'cwork.inc' include 'ctime.inc' real alpha(3), beta(3) data alpha / 0., -0.641874, -1.31021/ data beta /0.46173, 0.924087, 0.390614/ do i=1,3 if (i .eq. 1) then drdt = 0. dpxdt = 0. dpydt = 0. dpzdt = 0. dedt = 0. else drdt = alpha(i)*drdt dpxdt = alpha(i)*dpxdt dpydt = alpha(i)*dpydt dpzdt = alpha(i)*dpzdt dedt = alpha(i)*dedt nflop = nflop + 5 end if call pde if (i .eq.1) then call Courant end if r = r + dt*beta(i)*drdt px = px + dt*beta(i)*dpxdt py = py + dt*beta(i)*dpydt pz = pz + dt*beta(i)*dpzdt e = e + dt*beta(i)*dedt nflop = nflop + 10 end do t = t + dt END