32 subroutine flagger(nvar,naux,lcheck,start_time)
35 implicit double precision (a-h,o-z)
37 integer omp_get_thread_num, omp_get_max_threads
38 integer mythread/0/, maxthreads/1/
39 integer listgrids(numgrids(lcheck)), locuse
41 do jg = 1, numgrids(lcheck)
43 levst = liststart(lcheck)
44 mptr = listofgrids(levst+jg-1)
45 nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
46 ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
49 if (flag_richardson)
then
50 locbig =
igetsp(mitot*mjtot*nvar)
51 node(tempptr,mptr) = locbig
57 locamrflags =
igetsp(mibuff*mjbuff)
58 node(storeflags,mptr) = locamrflags
71 do jg = 1, numgrids(lcheck)
73 levst = liststart(lcheck)
74 mptr = listofgrids(levst+jg-1)
75 nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
76 ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
79 locnew = node(store1,mptr)
80 locaux = node(storeaux,mptr)
81 time = rnode(timemult,mptr)
84 xleft = rnode(cornxlo,mptr)
85 ybot = rnode(cornylo,mptr)
86 xlow = xleft - nghost*dx
87 ylow = ybot - nghost*dy
89 locbig = node(tempptr,mptr)
94 if (start_time+possk(lcheck) .ne. time)
then
97 call
bound(time,nvar,nghost,alloc(locnew),mitot,mjtot,mptr,
100 if (flag_richardson)
then
101 do 10 i = 1, mitot*mjtot*nvar
102 10 alloc(locbig+i-1) = alloc(locnew+i-1)
106 locold = node(store2,mptr)
109 if (flag_richardson)
then
110 do 11 i = 1, mitot*mjtot*nvar
111 11 alloc(locbig+i-1) = alloc(locold+i-1)
117 mbuff = max(nghost,ibuff+1)
118 mibuff = nx + 2*mbuff
119 mjbuff = ny + 2*mbuff
123 locamrflags = node(storeflags,mptr)
124 do 20 i = 1, mibuff*mjbuff
125 20 alloc(locamrflags+i-1) = goodpt
127 if (flag_gradient)
then
135 & xleft,ybot,dx,dy,time,lcheck,
136 & tolsp,alloc(locuse),
137 & alloc(locaux),alloc(locamrflags),
141 if (flag_richardson)
then
142 call
errest(nvar,naux,lcheck,mptr,nx,ny)
subroutine errest(nvar, naux, lcheck, mptr, nx, ny)
subroutine flag2refine2(mx, my, mbc, mbuff, meqn, maux, xlower, ylower, dx, dy, t, level, tolsp, q, aux, amrflags, DONTFLAG, DOFLAG)
User routine to control flagging of points for refinement.
subroutine bound(time, nvar, ng, valbig, mitot, mjtot, mptr, aux, naux)
This routine sets the boundary values for a given grid at level level.
subroutine flagger(nvar, naux, lcheck, start_time)
Set up for and call two routines that flag using (a) spatial gradients, or other user-specified crite...