c c c ========================================================= subroutine src(maxmx,maxmy,meqn,mbc,ibx,iby,mx,my,q, & aux,maux,t,dt,ibnd) c ========================================================= c c Copyright (C) 2003-2007 California Institute of Technology c Ralf Deiterding, ralf@amroc.net c implicit double precision(a-h,o-z) c include "cuser.i" c dimension q(meqn, 1-ibx*mbc:maxmx+ibx*mbc, & 1-iby*mbc:maxmy+iby*mbc) dimension aux(maux, 1-ibx*mbc:maxmx+ibx*mbc, & 1-iby*mbc:maxmy+iby*mbc) dimension qstar(6) c c # 2-stage Runge-Kutta method: c integrate source for gravity c dt2 = dt/2.d0 c do 100 i=1-ibx*ibnd*mbc,mx+ibx*ibnd*mbc do 100 j=1-iby*ibnd*mbc,my+iby*ibnd*mbc c qstar(1) = q(1,i,j) qstar(3) = q(3,i,j) + dt2*grav*q(1,i,j) qstar(4) = q(4,i,j) + dt2*grav*q(3,i,j) c c # second stage c q(3,i,j) = q(3,i,j) + dt*grav*qstar(1) q(4,i,j) = q(4,i,j) + dt*grav*qstar(3) c 100 continue c 401 format(' RK integration failure in (',i5,',', & i5,') t=',f20.12,' dt=',f20.12) return end c