2D AMRCLAW
domgrid.f
Go to the documentation of this file.
1 c
2 c ---------------------------------------------------------------------------------
3 c
4  subroutine domgrid(lbase,lcheck)
5 c
6  use amr_module
7  implicit double precision (a-h,o-z)
8 
9  mbuff = max(nghost,ibuff+1)
10 c
11 c loop over base grids to get proper nesting domain for grids at level lcheck
12 c but only upsize to the lcheck grids dimensions
13 c
14 
15  mptr = lstart(lcheck)
16  10 continue
17  ilo = node(ndilo,mptr)
18  ihi = node(ndihi,mptr)
19  jlo = node(ndjlo,mptr)
20  jhi = node(ndjhi,mptr)
21  nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
22  ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
23 c up to mbuff cells on each side might be flagged and
24 c buffered, so to allow shrinkage, need yet one additional
25 c cell on each side to be set from base grids
26  mibuff = nx + 2*mbuff
27  mjbuff = ny + 2*mbuff
28  ibytesperdp = 8
29 
30 c bad names, for historical reasons. they are both smae size now
31  locdomflags = igetsp( (mibuff*mjbuff)/ibytesperdp+1)
32  locdom2 = igetsp( (mibuff*mjbuff)/ibytesperdp+1)
33 
34 
35  node(domflags_base,mptr) = locdomflags
36  node(domflags2,mptr) = locdom2
37  call setdomflags(mptr,alloc(locdomflags),ilo,ihi,jlo,jhi,
38  . mbuff,lbase,lcheck,mibuff,mjbuff)
39 
40  mptr = node(levelptr, mptr)
41  if (mptr .ne. 0) go to 10
42 
43  return
44  end
function igetsp(nwords)
Definition: igetsp.f:4
subroutine domgrid(lbase, lcheck)
Definition: domgrid.f:4
subroutine setdomflags(mptr, igridflags, ilo, ihi, jlo, jhi, mbuff, lbase, lcheck, mibuff, mjbuff)
Definition: setdomflags.f:4