24 subroutine stepgrid(q,fm,fp,gm,gp,mitot,mjtot,mbc,dt,dtnew,dx,dy,
25 & nvar,xlow,ylow,time,mptr,maux,aux)
46 implicit double precision (a-h,o-z)
49 common /comxyt/ dtcom,dxcom,dycom,tcom,icom,jcom
51 parameter(msize=
max1d+4)
54 dimension q(nvar,mitot,mjtot)
55 dimension fp(nvar,mitot,mjtot),gp(nvar,mitot,mjtot)
56 dimension fm(nvar,mitot,mjtot),gm(nvar,mitot,mjtot)
57 dimension aux(maux,mitot,mjtot)
61 data debug/.false./, dump/.false./
71 write(
outunit,*)
"dumping grid ",mptr,
" at time ",time
74 write(
outunit,545) i,j,(q(ivar,i,j),ivar=1,nvar)
76 545
format(2i4,5e15.7)
86 xlowmbc = xlow + mbc*dx
87 ylowmbc = ylow + mbc*dy
130 & xlowmbc,ylowmbc,dx,dy,time,dt,maux,aux)
135 call step2(mbig,nvar,maux,
137 & q,aux,dx,dy,dt,cflgrid,
138 & fm,fp,gm,gp,
rpn2,rpt2)
156 do 50 j=mbc+1,mjtot-mbc
157 do 50 i=mbc+1,mitot-mbc
164 & - dtdx * (fm(m,i+1,j) - fp(m,i,j))
165 & - dtdy * (gm(m,i,j+1) - gp(m,i,j))
169 & - (dtdx * (fm(m,i+1,j) - fp(m,i,j))
170 & + dtdy * (gm(m,i,j+1) - gp(m,i,j))) / aux(
mcapa,i,j)
178 call src2(nvar,mbc,mx,my,xlowmbc,ylowmbc,dx,dy,
179 & q,maux,aux,time,dt)
186 write(
dbugunit,*)
" fluxes for grid ",mptr
188 do 830 i = mbc+1, mitot-1
189 do 830 j = mbc+1, mjtot-1
190 write(
dbugunit,831) i,j,fm(1,i,j),fp(1,i,j),
191 . gm(1,i,j),gp(1,i,j)
193 write(
dbugunit,832) fm(m,i,j),fp(m,i,j),
194 . gm(m,i,j),gp(m,i,j)
195 831
format(2i4,4d16.6)
196 832
format(8x,4d16.6)
206 if (cflgrid .gt. 0.d0)
then 207 dtnew = dt*
cfl/cflgrid
216 if (cflgrid .gt.
cflv1)
then 219 810
format(
'*** WARNING *** Courant number =', d12.4,
220 &
' is larger than input cfl_max = ', d12.4)
224 write(
outunit,*)
"dumping grid ",mptr,
" after stepgrid" 227 write(
outunit,545) i,j,(q(ivar,i,j),ivar=1,nvar)
integer, parameter dbugunit
integer, dimension(7) method
integer, parameter maxvar
real(kind=8), parameter rinfinity
subroutine b4step2(mbc, mx, my, meqn, q, xlower, ylower, dx, dy, t, dt, maux, aux)
Called before each call to step2.
integer, parameter maxaux
subroutine src2(meqn, mbc, mx, my, xlower, ylower, dx, dy, q, maux, aux, t, dt)
subroutine stepgrid(q, fm, fp, gm, gp, mitot, mjtot, mbc, dt, dtnew, dx, dy, nvar, xlow, ylow, time, mptr, maux, aux)
Take a time step on a single grid mptr and overwrite solution array q.
integer, parameter outunit
subroutine rpn2(ixy, maxm, meqn, mwaves, maux, mbc, mx, ql, qr, auxl, auxr, wave, s, amdq, apdq)
subroutine step2(maxm, meqn, maux, mbc, mx, my, qold, aux, dx, dy, dt, cflgrid, fm, fp, gm, gp, rpn2, rpt2)
Compute all fluxes at cell edges.
The module contains the definition of a "node descriptor" as well as other global variables used duri...