2D AMRCLAW
Functions/Subroutines
fluxsv.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine fluxsv (mptr, xfluxm, xfluxp, yfluxm, yfluxp, listbc,
 When a coarse grid cell is advanced, if it borders a coarse-fine interface, the flux or wave that emits from the interface and goes into the coarse cell is added to the corresponding location in node(ffluxptr, mkid) for conservative fix later, where mkid is grid number of the nested fine grid on the other side of that interface. More...
 

Function/Subroutine Documentation

◆ fluxsv()

subroutine fluxsv (   mptr,
dimension(nvar,ndimx,ndimy)  xfluxm,
dimension(nvar,ndimx,ndimy)  xfluxp,
dimension(nvar,ndimx,ndimy)  yfluxm,
dimension(nvar,ndimx,ndimy)  yfluxp,
dimension(5,maxsp)  listbc 
)

When a coarse grid cell is advanced, if it borders a coarse-fine interface, the flux or wave that emits from the interface and goes into the coarse cell is added to the corresponding location in node(ffluxptr, mkid) for conservative fix later, where mkid is grid number of the nested fine grid on the other side of that interface.

Definition at line 11 of file fluxsv.f.

References amr_module::alloc, amr_module::dbugunit, amr_module::ffluxptr, amr_module::ndihi, amr_module::ndilo, amr_module::ndjhi, amr_module::ndjlo, amr_module::nestlevel, and amr_module::node.

Referenced by par_advanc().

11  1 ndimx,ndimy,nvar,maxsp,dtc,hx,hy)
12 c
13  use amr_module
14  implicit double precision (a-h,o-z)
15 
16 
17  dimension xfluxp(nvar,ndimx,ndimy), yfluxp(nvar,ndimx,ndimy)
18  dimension xfluxm(nvar,ndimx,ndimy), yfluxm(nvar,ndimx,ndimy)
19  dimension listbc(5,maxsp)
20 c
21 c :::::::::::::::::::: fluxsv :::::::::::::::::::::::::
22 c
23 c coarse grids should save their fluxes in cells adjacent to
24 c their nested fine grids, for later conservation fixing.
25 c listbc holds info for where to save which fluxes.
26 c xflux holds 'f' fluxes, yflux holds 'g' fluxes.
27 c
28 c :::::::::::::::::::::::::::::;:::::::::::::::::::::::
29 
30 
31  ispot = 1
32  level = node(nestlevel,mptr)
33 
34  10 if (listbc(1,ispot).eq.0) go to 99
35 c
36  mkid = listbc(4,ispot)
37  intopl = listbc(5,ispot)
38  nx = node(ndihi,mkid) - node(ndilo,mkid) + 1
39  ny = node(ndjhi,mkid) - node(ndjlo,mkid) + 1
40  kidlst = node(ffluxptr,mkid)
41  i = listbc(1,ispot)
42  j = listbc(2,ispot)
43  inlist = kidlst + nvar*(intopl-1) - 1
44 c
45 c side k(listbc 3) has which side of coarse cell has interface
46 c so can save appropriate fluxes. (dont know why we didnt have
47 c which flux to save directly(i.e. put i+1,j to save that flux
48 c rather than putting in cell center coords).
49 
50  if (listbc(3,ispot) .eq. 1) then
51 c ::::: cell i,j is on right side of a fine grid
52  do 100 ivar = 1, nvar
53  alloc(inlist + ivar) = -xfluxp(ivar,i,j)*dtc*hy
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 nestlevel
AMR level of the grid.
Definition: amr_module.f90:44
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
subroutine fluxsv(mptr, xfluxm, xfluxp, yfluxm, yfluxp, listbc,
When a coarse grid cell is advanced, if it borders a coarse-fine interface, the flux or wave that emi...
Definition: fluxsv.f:11
integer, parameter ndjhi
global j index of upper border of this grid
Definition: amr_module.f90:117
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
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
Here is the caller graph for this function: