2D AMRCLAW
setIndices.f
Go to the documentation of this file.
1 c
2 c -----------------------------------------------------------------------
3 c
4  subroutine setindices(ist,iend,jst,jend,ilo,ihi,jlo,jhi,
5  & ishift,jshift,level)
6 
7  use amr_module
8  implicit double precision (a-h,o-z)
9 
10  dimension ist(3), iend(3), jst(3), jend(3), ishift(3), jshift(3)
11 
12 c ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
15 c
16 c this is just annoying code this is needed in several places so it became a routine
17 c
18 c :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
19 
20 
21  ist(1) = ilo
22  ist(2) = 0
23  ist(3) = iregsz(level)
24 
25  iend(1) = -1
26  iend(2) = iregsz(level)-1
27  iend(3) = ihi
28 
29  jst(1) = jlo
30  jst(2) = 0
31  jst(3) = jregsz(level)
32 
33  jend(1) = -1
34  jend(2) = jregsz(level)-1
35  jend(3) = jhi
36 
37  if (xperdom) then ! regions that stick out of domain get periodically wrapped indices
38  ishift(1) = iregsz(level)
39  ishift(2) = 0
40  ishift(3) = -iregsz(level)
41  else ! no shifting of indices
42  ishift(1) = 0
43  ishift(2) = 0
44  ishift(3) = 0
45  endif
46 
47  if (yperdom) then
48  jshift(1) = jregsz(level)
49  jshift(2) = 0
50  jshift(3) = -jregsz(level)
51  else ! no shifting of indices
52  jshift(1) = 0
53  jshift(2) = 0
54  jshift(3) = 0
55  endif
56 
57 
58  return
59  end
integer, dimension(maxlv) iregsz
Definition: amr_module.f90:198
integer, dimension(maxlv) jregsz
Definition: amr_module.f90:198
logical yperdom
Definition: amr_module.f90:230
subroutine setindices(ist, iend, jst, jend, ilo, ihi, jlo, jhi, ishift, jshift, level)
Definition: setIndices.f:6
logical xperdom
Definition: amr_module.f90:230
The module contains the definition of a "node descriptor" as well as other global variables used duri...
Definition: amr_module.f90:21