2D AMRCLAW
prepf.f
Go to the documentation of this file.
1 c
16 c ----------------------------------------------------------
17 c
18  subroutine prepf(level,nvar,naux)
19 c
20  use amr_module
21  implicit double precision (a-h,o-z)
22 
23 c
24 c ::::::::::::::::::::::::::: PREPF :::::::::::::::::::::::::::::
25 c
26 c prepare new fine grids to save fluxes after each integration step
27 c for future conservative fixing of coarse grids
28 c save all boundary fluxes of fine grid (even if phys. bndry.) -
29 c but only save space for every intrat. (remember - 4 fluxes).
30 c
31 c :::::::::::::::::::::::::::::::::::;:::::::::::::::::::::::::::
32 c
33  mkid = lstart(level)
34  10 if (mkid .eq. 0) go to 99
35  nx = node(ndihi,mkid)-node(ndilo,mkid) + 1
36  ny = node(ndjhi,mkid)-node(ndjlo,mkid) + 1
37  ikeep = nx/intratx(level-1)
38  jkeep = ny/intraty(level-1)
39  lenbc = 2*(ikeep+jkeep)
40 c
41 c get twice the storage, one for plus or minus fluxes, the
42 c other for coarse solution for wave fixing. also for aux vars.
43 c
44  node(ffluxptr,mkid) = igetsp(2*nvar*lenbc+naux*lenbc)
45  ist = node(ffluxptr,mkid)
46 
47  do 20 i = 1, 2*nvar*lenbc + naux*lenbc
48  20 alloc(ist+i-1) = 0.d0
49  mkid = node(levelptr,mkid)
50  go to 10
51 
52  99 return
53  end
function igetsp(nwords)
Allocate contiguous space of length nword in main storage array alloc.
Definition: igetsp.f:9
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 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, dimension(maxlv) intraty
Definition: amr_module.f90:198
integer, parameter ndjhi
global j index of upper border of this grid
Definition: amr_module.f90:117
integer, dimension(maxlv) intratx
Definition: amr_module.f90:198
integer, parameter levelptr
node number (index) of next grid on the same level
Definition: amr_module.f90:35
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
subroutine prepf(level, nvar, naux)
For new fine grids (grids on level level), allocate space for saving fluxes at boundary (even if it's...
Definition: prepf.f:19
integer, parameter ffluxptr
pointer to the address of memory storing fluxes in a layer around the grid, to be used in conservatio...
Definition: amr_module.f90:97