2D AMRCLAW
Functions/Subroutines
flagcheck.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine flagcheck (rectflags, ilo, ihi, jlo, jhi, mbuff, iflags,
 Check if every cell in grid mptr is properly nested in base level grids (base level in current refinement, usually represented by lbase). More...
 

Function/Subroutine Documentation

◆ flagcheck()

subroutine flagcheck ( dimension(ilo-mbuff:ihi+mbuff,jlo-mbuff:jhi+mbuff)  rectflags,
  ilo,
  ihi,
  jlo,
  jhi,
  mbuff,
integer*1, dimension(ilo-mbuff:ihi+mbuff,jlo-mbuff:jhi+mbuff)  iflags 
)

Check if every cell in grid mptr is properly nested in base level grids (base level in current refinement, usually represented by lbase).

If not, turn off the flagging on that cell (mark as needing no refinement).

Definition at line 10 of file flagcheck.f.

References check(), domain(), amr_module::goodpt, amr_module::nestlevel, amr_module::node, amr_module::nprint, and amr_module::outunit.

Referenced by colate2().

10  . imin,imax,jmin,jmax,mptr)
11 
12  use amr_module
13  implicit double precision (a-h, o-z)
14 
15  dimension rectflags(ilo-mbuff:ihi+mbuff,jlo-mbuff:jhi+mbuff)
16  integer*1 iflags(ilo-mbuff:ihi+mbuff,jlo-mbuff:jhi+mbuff)
17 c
18 c should really only check interior border cells here
19 c
20  level = node(nestlevel,mptr)
21 c
22 c want to check all cells for flagging, including buffer
23 c but wrap if periodic when put on list
24 c if not periodic no need to check if outside domain
25 c
26 
27  do 10 j = jmin, jmax
28  do 10 i = imin, imax
29  if (rectflags(i,j) .eq. goodpt) go to 10
30  if (iflags(i,j) .ne. 1) then !point not nested. turn off
31  rectflags(i,j) = 0.
32  if (nprint) then
33  write(outunit,100) i,j,mptr
34  100 format("turning off point ",2i5," from grid ",i5)
35  endif
36  endif
37  10 continue
38 
39  return
integer, dimension(nsize, maxgr) node
Definition: amr_module.f90:198
integer, parameter nestlevel
AMR level of the grid.
Definition: amr_module.f90:44
real(kind=8), parameter goodpt
Definition: amr_module.f90:163
subroutine check(nsteps, time, nvar, naux)
Definition: check.f:5
logical nprint
Definition: amr_module.f90:297
integer, parameter outunit
Definition: amr_module.f90:290
subroutine domain(nvar, vtime, nx, ny, naux, start_time)
Definition: domain.f:5
The module contains the definition of a "node descriptor" as well as other global variables used duri...
Definition: amr_module.f90:21
Here is the call graph for this function:
Here is the caller graph for this function: