4 subroutine gfixup(lbase, lfnew, nvar, naux, newnumgrids,
8 implicit double precision (a-h,o-z)
10 integer omp_get_thread_num, omp_get_max_threads
11 integer mythread/0/, maxthreads/1/
12 integer newnumgrids(maxlv), listnewgrids(maxnumnewgrids)
28 call
putsp(lbase,lbase,nvar,naux)
30 1
if (level .gt. lfine) go to 4
31 call
putsp(lbase,level,nvar,naux)
33 2
if (mptr .eq. 0) go to 3
34 nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
35 ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
38 nwords = mitot*mjtot*nvar
39 if (level .lt. mxnest)
40 . call
reclam(node(store2, mptr), nwords)
41 node(store2, mptr) = 0
42 mptr = node(levelptr, mptr)
49 time = rnode(timemult, lstart(lbase))
50 5
if (lcheck .gt. mxnest) go to 99
59 call
prepnewgrids(listnewgrids,newnumgrids(lcheck),lcheck)
63 do j = 1, newnumgrids(lcheck)
64 mptr = listnewgrids(j)
65 nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
66 ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
69 loc =
igetsp(mitot * mjtot * nvar)
70 node(store1, mptr) = loc
72 locaux =
igetsp(mitot * mjtot * naux)
76 node(storeaux, mptr) = locaux
89 do j = 1, newnumgrids(lcheck)
90 mptr = listnewgrids(j)
95 nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
96 ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
99 corn1 = rnode(cornxlo,mptr)
100 corn2 = rnode(cornylo,mptr)
101 loc = node(store1, mptr)
102 if (naux .gt. 0)
then
103 locaux = node(storeaux, mptr)
122 mic = nx/intratx(lcheck-1) + 2
123 mjc = ny/intraty(lcheck-1) + 2
124 xl = rnode(cornxlo,mptr)
125 xr = rnode(cornxhi,mptr)
126 yb = rnode(cornylo,mptr)
127 yt = rnode(cornyhi,mptr)
128 ilo = node(ndilo, mptr)
129 ihi = node(ndihi, mptr)
130 jlo = node(ndjlo, mptr)
131 jhi = node(ndjhi, mptr)
133 call
filval(alloc(loc),mitot,mjtot,hx,hy,lcheck,time,
136 3 mptr,ilo,ihi,jlo,jhi,
137 4 alloc(locaux),naux)
145 80 mptr = lstart(lcheck)
146 85
if (mptr .eq. 0) go to 90
147 nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
148 ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
149 mitot = nx + 2*nghost
150 mjtot = ny + 2*nghost
151 call
reclam(node(store1,mptr),mitot*mjtot*nvar)
152 if (naux .gt. 0)
then
153 call
reclam(node(storeaux,mptr),mitot*mjtot*naux)
156 mptr = node(levelptr,mptr)
160 90 lstart(lcheck) = newstl(lcheck)
168 levend = min(lfine,mxnest-1)
169 do 110 level = lbase+1, levend
171 105
if (mptr .eq. 0) go to 110
172 nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
173 ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
174 mitot = nx + 2*nghost
175 mjtot = ny + 2*nghost
176 nwords = mitot*mjtot*nvar
177 node(store2,mptr) =
igetsp(nwords)
178 mptr = node(levelptr,mptr)
201 implicit double precision (a-h,o-z)
202 integer listnewgrids(num)
206 listnewgrids(j) = mptr
207 mptr = node(levelptr, mptr)
210 if (mptr .ne. 0)
then
211 write(*,*)
" Error in routine setting up grid array "
subroutine filval(val, mitot, mjtot, dx, dy, level, time, mic, mjc, xleft, xright, ybot, ytop, nvar, mptr, ilo, ihi, jlo, jhi, aux, naux)
subroutine reclam(index, nwords)
subroutine freebndrylist(mold)
subroutine gfixup(lbase, lfnew, nvar, naux, newnumgrids, maxnumnewgrids)
subroutine prepnewgrids(listnewgrids, num, level)
subroutine putsp(lbase, level, nvar, naux)