12 implicit double precision (a-h, o-z)
14 dimension val(nvar,nrow,ncol)
15 dimension aux(naux,nrow,ncol)
21 iadd(ivar,i,j) = loc + ivar-1 + nvar*((j-1)*mitot+i-1)
22 iaddaux(ivar,i,j) = locaux + ivar-1 + naux*((j-1)*mitot+i-1)
24 c :::::::::::::::::::::::::::
icall :::::::::::::::::::::::::::::::
26 c find intersecting grids at the same level. copy
data from
27 c intersecting grids to both val and aux arrays.
29 c
use larger definition of grids here - boundary data already in.
30 c aux arrays also enlarged size.
32 c iputst, jputst:
where to copy values into. may not be in
33 c location corresponding to ilo,ihi,etc.
if 34 c the patch has been periodically wrapped.
37 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
42 10
if (mptr .eq. 0)
go to 99
48 c
# does it intersect? 49 c$$$ ixlo = max(iglo-
nghost,ilo)
50 c$$$ ixhi = min(ighi+
nghost,ihi)
51 c$$$ jxlo = max(jglo-
nghost,jlo)
52 c$$$ jxhi = min(jghi+
nghost,jhi)
53 c how did ghost cells get in the allowable region? they are not filled
54 c(since we may be interpolating from newly filled grids, not just grids
55 c that have been primed with bcs to be advanced.
62 if (ixlo .le. ixhi .and. jxlo .le. jxhi)
then 73 val(ivar,i-ilo+iputst,j-jlo+jputst) =
alloc(ialloc)
77 aux(iaux,i-ilo+iputst,j-jlo+jputst) =
alloc(ialloc)
86 c
if cells stick out of
domain but not periodic
then set
elsewhere 87 c either
setaux and
bc2amr. (called from routine that called this, e.g.
subroutine bc2amr(val, aux, nrow, ncol, meqn, naux,
Take a grid patch with mesh widths hx,hy, of dimensions nrow by ncol, and set the values of any piece...
subroutine saveqc(level, nvar, naux)
Prepare new fine grids to save fluxes after each integration step for future conservative fix-up on c...
subroutine filval(val, mitot, mjtot, dx, dy, level, time, mic, mjc, xleft, xright, ybot, ytop, nvar, mptr, ilo, ihi, jlo, jhi, aux, naux)
Fill grid mptr on level level by copying values from OLD level level grids if available, otherwise by interpolating values from coarser grids.
logical pure function sticksout(iplo, iphi, jplo, jphi)
integer, parameter ndihi
global i index of right border of this grid
integer, dimension(nsize, maxgr) node
integer pure function iadd(ivar, i, j)
subroutine icall(val, aux, nrow, ncol, nvar, naux, ilo, ihi, jlo, jhi, level, iputst, jputst)
For a rectangle defined on level level and bound by ilo, ihi, jlo, jhi, find intersecting grids at th...
integer, parameter ndilo
global i index of left border of this grid
integer, parameter ndjlo
global j index of lower border of this grid
integer, parameter store1
pointer to the address of memory storing the first copy of solution data on this grid, usually for storing new solution
integer, dimension(maxlv) lstart
integer, parameter ndjhi
global j index of upper border of this grid
integer, parameter levelptr
node number (index) of next grid on the same level
subroutine domain(nvar, vtime, nx, ny, naux, start_time)
The module contains the definition of a "node descriptor" as well as other global variables used duri...
subroutine setaux(mbc, mx, my, xlower, ylower, dx, dy, maux, aux)
integer, parameter storeaux
pointer to the address of memory storing auxiliary data on this grid
real(kind=8), dimension(:), allocatable alloc