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
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)
Allocate contiguous space of length nword in main storage array alloc.
Definition: igetsp.f:9
subroutine domgrid(lbase, lcheck)
Definition: domgrid.f:5
integer, parameter ndihi
global i index of right border of this grid
Definition: amr_module.f90:111
integer, dimension(nsize, maxgr) node
Definition: amr_module.f90:198
integer, parameter domflags_base
domain flags, indexed within base level (lbase) index space
Definition: amr_module.f90:129
integer, parameter domflags2
domain flags, indexed within level-of-this-grid level index space
Definition: amr_module.f90:132
integer, parameter ndilo
global i index of left border of this grid
Definition: amr_module.f90:108
integer, parameter ndjlo
global j index of lower border of this grid
Definition: amr_module.f90:114
integer, dimension(maxlv) lstart
Definition: amr_module.f90:198
integer ibuff
Definition: amr_module.f90:198
integer, parameter ndjhi
global j index of upper border of this grid
Definition: amr_module.f90:117
integer, parameter levelptr
node number (index) of next grid on the same level
Definition: amr_module.f90:35
subroutine setdomflags(mptr, igridflags, ilo, ihi, jlo, jhi, mbuff, lbase, lcheck, mibuff, mjbuff)
set domain flags (not AMR flags) for grid mptr (only), enlarged by buffer zone.
Definition: setdomflags.f:24
integer nghost
Definition: amr_module.f90:232
The module contains the definition of a "node descriptor" as well as other global variables used duri...
Definition: amr_module.f90:21
real(kind=8), dimension(:), allocatable alloc
Definition: amr_module.f90:218