7 implicit double precision (a-h,o-z)
15 if (ndfree .ne. null) go to 10
16 write(outunit,100) maxgr
18 100
format(
' out of nodal space - allowed ',i8,
' grids')
20 write(*,101) level,numgrids(level)
21 101
format(
" level ",i4,
" has ",i6,
'grids')
23 write(*,*)
" Could need twice as many grids as on any given"
24 write(*,*)
" level if regridding/birecting"
30 ndfree = node(nextfree,ndfree)
50 implicit double precision (a-h,o-z)
57 if (ndfree_bnd .ne. null) go to 10
58 write(outunit,100) bndlistsize
59 write(*,100) bndlistsize
60 100
format(
' out of bndry space - allowed ',i5,
' bndry grids')
65 numgridstotal = numgridstotal + numgrids(lev)
66 do mptr = 1, numgrids(lev)
67 nbortotal = nbortotal + node(bndlistnum,mptr)
70 avgnbors = float(nbortotal)/numgridstotal
71 write(*,101) numgridstotal,nbortotal,avgnbors
72 101
format(
" There are ",i8,
" total grids", i10,
" bndry nbors",
73 .
" average num/grid ",f10.3)
80 ndfree_bnd = bndlist(ndfree_bnd,nextfree)
97 integer lbase, levst, lev, mptr, n
109 do lev = lbase+1, lfine
110 levst = liststart(lev)
114 do n = 1, numgrids(lev)
115 listofgrids(levst+n-1) = mptr
116 mptr = node(levelptr,mptr)
123 liststart(lev+1) = levst + numgrids(lev)
140 do i = 1, bndlistsize
141 bndlist(i,nextfree) = i+1
144 bndlist(bndlistsize,nextfree) = null
156 integer level, n, levst, k, nborcount
157 integer nodget_bnd, nextspot, prevnbor, msrc, mptr
158 integer imin, imax, jmin, jmax
159 integer imlo, imhi, jmlo, jmhi
160 integer ixlo, ixhi, jxlo, jxhi
168 levst = liststart(level)
169 do n = 1, numgrids(level)
170 mptr = listofgrids(levst+n-1)
171 imin = node(ndilo,mptr) - nghost
172 imax = node(ndihi,mptr) + nghost
173 jmin = node(ndjlo,mptr) - nghost
174 jmax = node(ndjhi,mptr) + nghost
177 do k = 1, numgrids(level)
179 msrc = listofgrids(levst+k-1)
182 imlo = node(ndilo, msrc)
183 jmlo = node(ndjlo, msrc)
184 imhi = node(ndihi, msrc)
185 jmhi = node(ndjhi, msrc)
187 ixlo = max(imlo,imin)
188 ixhi = min(imhi,imax)
189 jxlo = max(jmlo,jmin)
190 jxhi = min(jmhi,jmax)
192 if (ixlo .le. ixhi .and. jxlo .le. jxhi)
then
193 nborcount = nborcount + 1
195 bndlist(nextspot,gridnbor) = msrc
197 bndlist(nextspot,nextfree) = node(bndlistst,mptr)
198 node(bndlistst,mptr) = nextspot
204 node(bndlistnum,mptr) = nborcount
217 integer nborcount, mold,nextspot, i, nextnext
224 nborcount = node(bndlistnum,mold)
225 nextspot = node(bndlistst,mold)
227 nextnext = bndlist(nextspot,nextfree)
subroutine makebndrylist(level)
subroutine makegridlist(lbase)
subroutine freebndrylist(mold)
integer function nodget()
subroutine putnod_bnd(mcell)
integer function nodget_bnd()
subroutine initbndrylist()