2D AMRCLAW
putsp.f
Go to the documentation of this file.
1 c
2 c ----------------------------------------------------------
5 c
6  subroutine putsp(lbase,level,nvar,naux)
7 c
8  use amr_module
9  implicit double precision (a-h,o-z)
10 
11 c
12 c ::::::::::::::::::::::::::::::: PUTSP :::::::::::::::::::::::::
13 c
14 c reclaim list space in nodes cfluxptr and ffluxptr for grids at level
15 c
16 c first compute max. space allocated in node cfluxptr.
17 c
18 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
19 c
20  if (level .eq. lfine) go to 30
21 c
22  mptr = lstart(level)
23  20 call reclam(node(cfluxptr,mptr), 5*listsp(level))
24  node(cfluxptr,mptr) = 0
25  mptr = node(levelptr,mptr)
26  if (mptr .ne. 0) go to 20
27 c
28  30 if (level .eq. lbase) go to 99
29  mptr = lstart(level)
30  40 nx = node(ndihi,mptr) - node(ndilo,mptr) + 1
31  ny = node(ndjhi,mptr) - node(ndjlo,mptr) + 1
32  ikeep = nx/intratx(level-1)
33  jkeep = ny/intraty(level-1)
34  lenbc = 2*(ikeep+jkeep)
35 c twice perimeter since saving plus or minus fluxes
36 c plus coarse solution storage
37  call reclam(node(ffluxptr,mptr), 2*nvar*lenbc+naux*lenbc)
38  mptr = node(levelptr,mptr)
39  if (mptr .ne. 0) go to 40
40 c
41  99 return
42  end
subroutine reclam(index, nwords)
Definition: reclam.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 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) listsp
Definition: amr_module.f90:198
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
integer, parameter cfluxptr
Pointer to an 5 by maxsp array, which has boundary information for this grid.
Definition: amr_module.f90:80
integer lfine
Definition: amr_module.f90:198
subroutine putsp(lbase, level, nvar, naux)
Reclaim list space in nodes cfluxptr and ffluxptr for all grids at level level
Definition: putsp.f:7
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