2D AMRCLAW
Functions/Subroutines
filpatch.f90 File Reference

Go to the source code of this file.

Functions/Subroutines

recursive subroutine filrecur (level, nvar, valbig, aux, naux, t, mitot, mjtot, nrowst, ncolst, ilo, ihi, jlo, jhi, patchOnly, msrc)
 Fill a region (patch) described by: More...
 
integer pure function coarse_index (n, i, j)
 
logical pure function sticksout (iplo, iphi, jplo, jphi)
 

Function/Subroutine Documentation

integer pure function filrecur::coarse_index ( integer, intent(in)  n,
integer, intent(in)  i,
integer, intent(in)  j 
)

Definition at line 342 of file filpatch.f90.

Referenced by coarse_index(), and filrecur().

Here is the caller graph for this function:

recursive subroutine filrecur ( integer, intent(in)  level,
integer, intent(in)  nvar,
real(kind=8), dimension(nvar,mitot,mjtot), intent(inout)  valbig,
real(kind=8), dimension(naux,mitot,mjtot), intent(inout)  aux,
integer, intent(in)  naux,
real(kind=8), intent(in)  t,
integer, intent(in)  mitot,
integer, intent(in)  mjtot,
integer, intent(in)  nrowst,
integer, intent(in)  ncolst,
integer, intent(in)  ilo,
integer, intent(in)  ihi,
integer, intent(in)  jlo,
integer, intent(in)  jhi,
logical  patchOnly,
integer, intent(in)  msrc 
)

Fill a region (patch) described by:

  • global indices of its lower left corner: (ilo, jlo).
  • global indices of its upper right corner: (ihi, jhi).

The patch is on grid msrc and starts from row nrowst and column ncolst of the grid.

It first fills the patch with values obtainable from level level grids. if any left unfilled, then enlarge remaining rectangle of unfilled values by 1 (for later linear interp), and recusively obtain the remaining values from coarser levels.

Algorithm

procedure filrecur(level, patch_fine, val_fine, firstCall)
fill patch_fine as much as possible by copy values from other level "level" grids
values on patch_fine is stored in array val_fine after the filling
if this is first call to filrecur() (firstCall == true)
don't fill cells outside the computational domain (it will be handled elsewhere)
else
this is a sencond or higher-level (recursive) call to filrecur()
fill cells outside the computational domain by calling bc2amr since they are used for interpolation for finer cells above them
end if
if not all cells in patch_fine is filled (set)
find the smallest rectangular patch on level "level-1", patch_coarse, that contains all unset fine cells in patch_fine
filrecur(level-1, patch_coarse, val_coarse, firstCall=false)
for each unset fine cells in patch_fine
interpolate from val_coarse to fill all unset cells on patch_fine
end for
end if
Parameters
levelAMR level the patch is on
nvarnumber of equations for the system
valbigdata array for solution $q $ (cover the whole grid msrc)
auxdata array for auxiliary variables
nauxnumber of auxiliary variables
tfill the patch with value at time t
mitotnumber of cells in i direction on grid msrc
mjtotnumber of cells in j direction on grid msrc
nrowstlocal i index (relative to lower-left corner of grid msrc) of the left-most cell of the patch to be filled
ncolstlocal j index (relative to lower-left corner of grid msrc) of the lower-most cell of the patch to be filled
iloglobal i index of left-most cell of this patch
ihiglobal i index of right-most cell of this patch
jloglobal j index of lower-most cell of this patch
jhiglobal j index of upper-most cell of this patch
patchOnlyThis is 1) false if this is a first level call to filrecur() and won't set bounday cells outside domain; 2) true if this is a second or higher level (recursive) call to filrecur() and will call bc2amr() to get values for cells outside domain (these cells are only for interpolation to fill cells in first level call to filrecur()
msrcindex of the grid

Definition at line 71 of file filpatch.f90.

References bc2amr(), coarse_index(), intfil(), prefilrecur(), setaux(), sticksout(), and trimbd().

Referenced by bound(), filrecur(), and prefilrecur().

Here is the call graph for this function:

Here is the caller graph for this function:

logical pure function filrecur::sticksout ( integer, intent(in)  iplo,
integer, intent(in)  iphi,
integer, intent(in)  jplo,
integer, intent(in)  jphi 
)

Definition at line 348 of file filpatch.f90.

Referenced by filrecur(), saveqc(), and sticksout().

Here is the caller graph for this function: