10 subroutine advanc (level,nvar,dtlevnew,vtime,naux)
13 implicit double precision (a-h,o-z)
17 integer omp_get_thread_num, omp_get_max_threads
18 integer mythread/0/, maxthreads/1/
20 integer clock_start, clock_finish, clock_rate
21 integer clock_startStepgrid,clock_startBound,clock_finishBound
22 real(kind=8) cpu_start, cpu_finish
23 real(kind=8) cpu_startBound, cpu_finishBound
24 real(kind=8) cpu_startStepgrid, cpu_finishStepgrid
41 call system_clock(clock_start,clock_rate)
42 call cpu_time(cpu_start)
52 call system_clock(clock_startbound,clock_rate)
53 call cpu_time(cpu_startbound)
85 call system_clock(clock_finishbound,clock_rate)
86 call cpu_time(cpu_finishbound)
92 if (level+1 .le.
mxnest)
then 94 call saveqc(level+1,nvar,naux)
102 call system_clock(clock_startstepgrid,clock_rate)
103 call cpu_time(cpu_startstepgrid)
123 call par_advanc(mptr,mitot,mjtot,nvar,naux,dtnew)
125 dtlevnew = dmin1(dtlevnew,dtnew)
131 call system_clock(clock_finish,clock_rate)
132 call cpu_time(cpu_finish)
133 tvoll(level) =
tvoll(level) + clock_finish - clock_start
146 subroutine prepgrids(listgrids, num, level)
149 implicit double precision (a-h,o-z)
150 integer listgrids(num)
158 if (mptr .ne. 0)
then 159 write(*,*)
" Error in routine setting up grid array " 170 subroutine par_advanc (mptr,mitot,mjtot,nvar,naux,dtnew)
174 implicit double precision (a-h,o-z)
177 integer omp_get_thread_num, omp_get_max_threads
178 integer mythread/0/, maxthreads/1/
180 double precision fp(nvar,mitot,mjtot),fm(nvar,mitot,mjtot)
181 double precision gp(nvar,mitot,mjtot),gm(nvar,mitot,mjtot)
212 if (level .lt.
mxnest)
then 213 ntot = mitot * mjtot * nvar
216 10
alloc(locold + i - 1) =
alloc(locnew + i - 1)
233 locsvq = locsvf + nvar*lenbc
234 locx1d = locsvq + nvar*lenbc
235 call qad(
alloc(locnew),mitot,mjtot,nvar,
251 .
alloc(locaux:locaux+nvar*mitot*mjtot),
252 . xlow,ylow,nvar,mitot,mjtot,naux,mptr)
260 3 delt,dtnew,hx,hy,nvar,
261 4 xlow,ylow,time,mptr,naux,
alloc(locaux))
266 3 delt,dtnew,hx,hy,nvar,
267 4 xlow,ylow,time,mptr,naux,
alloc(locaux))
270 write(6,*)
'*** Strang splitting not supported' 275 2
call fluxsv(mptr,fm,fp,gm,gp,
277 4 nvar,
listsp(level),delt,hx,hy)
282 2
alloc(locsvf),mptr,mitot,mjtot,nvar,
subroutine fluxad(xfluxm, xfluxp, yfluxm, yfluxp,
When a fine grid is updated, this subroutine is called to save fluxes going into an adjacent coarse c...
integer, parameter timemult
current simulation time on this grid
real(kind=8), parameter rinfinity
subroutine saveqc(level, nvar, naux)
Prepare new fine grids to save fluxes after each integration step for future conservative fix-up on c...
integer, parameter cornxlo
x-coordinate of the left border of this grid
real(kind=8), dimension(maxlv) hyposs
real(kind=8), dimension(maxlv) hxposs
integer, parameter ndihi
global i index of right border of this grid
subroutine qad(valbig, mitot, mjtot, nvar, svdflx, qc1d, lenbc, lratiox, lratioy, hx, hy, maux, aux, auxc1d, delt, mptr)
For each coarse-fine interface, a Riemann problem between an inner ghost cell value on the fine grid ...
integer, dimension(nsize, maxgr) node
subroutine update_gauges(q, aux, xlow, ylow, num_eqn, mitot, mjtot, num_aux, mptr)
integer, parameter nestlevel
AMR level of the grid.
integer, dimension(0:maxlv+1) liststart
integer, dimension(maxlv) numgrids
real(kind=8), dimension(rsize, maxgr) rnode
integer, dimension(maxgr) listofgrids
integer, parameter ndilo
global i index of left border of this grid
integer, parameter ndjlo
global j index of lower border of this grid
integer, parameter store1
pointer to the address of memory storing the first copy of solution data on this grid, usually for storing new solution
subroutine advanc(level, nvar, dtlevnew, vtime, naux)
Integrate all grids at the input level by one step of its delta(t)
integer, dimension(maxlv) lstart
integer dimensional_split
real(kind=8) timeboundcpu
integer, parameter store2
pointer to the address of memory storing the second copy of solution data on this grid...
real(kind=8), dimension(maxlv) tvollcpu
integer, dimension(maxlv) intraty
subroutine prepgrids(listgrids, num, level)
subroutine fluxsv(mptr, xfluxm, xfluxp, yfluxm, yfluxp, listbc,
When a coarse grid cell is advanced, if it borders a coarse-fine interface, the flux or wave that emi...
real(kind=8), dimension(maxlv) rvoll
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.
real(kind=8), dimension(maxlv) possk
integer, parameter ndjhi
global j index of upper border of this grid
integer, dimension(maxlv) listsp
subroutine bound(time, nvar, ng, valbig, mitot, mjtot, mptr, aux, naux)
This routine sets the boundary values for a given grid at level level.
real(kind=8) timestepgridcpu
integer, parameter cornylo
y-coordinate of the lower border of this grid
integer, dimension(maxlv) intratx
integer, parameter levelptr
node number (index) of next grid on the same level
The module contains the definition of a "node descriptor" as well as other global variables used duri...
integer, parameter cfluxptr
Pointer to an 5 by maxsp array, which has boundary information for this grid.
subroutine par_advanc(mptr, mitot, mjtot, nvar, naux, dtnew)
Integrate grid mptr.
subroutine stepgrid_dimsplit(q, fm, fp, gm, gp, mitot, mjtot, mbc, dt, dtnew, dx, dy, nvar, xlow, ylow, time, mptr, maux, aux)
integer, parameter storeaux
pointer to the address of memory storing auxiliary data on this grid
integer, dimension(maxlv) tvoll
real(kind=8), dimension(:), allocatable alloc
integer, parameter ffluxptr
pointer to the address of memory storing fluxes in a layer around the grid, to be used in conservatio...