diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-09-25 22:04:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2006-09-25 22:04:00 +0000 |
commit | a4b74b40375d6eb64c3be2cda8339ee15fe85d49 (patch) | |
tree | e3bfc1e416737c40a8b9af9973cbef3ca3e1ccc9 /Carpet/CarpetReduce | |
parent | 9330b8a02d9ba246848c7ac28b750b250d0c8a00 (diff) |
CarpetReduce: Rename local variables imin/imax to bmin/bmax
When storing the extent of the boundary, use the local variable names
bmin/bmax instead imin/imax.
darcs-hash:20060925220452-dae7b-7a12b1227486a66e0e4689554627c3f713b9d36b.gz
Diffstat (limited to 'Carpet/CarpetReduce')
-rw-r--r-- | Carpet/CarpetReduce/src/mask_coords.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/Carpet/CarpetReduce/src/mask_coords.c b/Carpet/CarpetReduce/src/mask_coords.c index 0545cdaac..91da80bb3 100644 --- a/Carpet/CarpetReduce/src/mask_coords.c +++ b/Carpet/CarpetReduce/src/mask_coords.c @@ -15,7 +15,8 @@ CoordBase_SetupMask (CCTK_ARGUMENTS) CCTK_INT is_staggered[6]; CCTK_INT shiftout[6]; - int imin[3], imax[3]; /* boundary extent */ + int imin[3], imax[3]; /* domain extent */ + int bmin[3], bmax[3]; /* boundary extent */ int i, j, k; int d, f; @@ -54,18 +55,23 @@ CoordBase_SetupMask (CCTK_ARGUMENTS) CCTK_WARN (0, "Illegal number of boundary points"); } - /* Calculate the extent of the boundary */ + /* Calculate the extent of the domain */ for (dd=0; dd<3; ++dd) { imin[dd] = 0; imax[dd] = cctk_lsh[dd]; } + /* Calculate the extent of the boundary */ + for (dd=0; dd<3; ++dd) { + bmin[dd] = imin[dd]; + bmax[dd] = imax[dd]; + } if (f==0) { /* lower face */ - imax[d] = imin[d] + npoints; + bmax[d] = imin[d] + npoints; } else { /* upper face */ - imin[d] = imax[d] - npoints; + bmin[d] = imax[d] - npoints; } /* Loop over the boundary */ @@ -73,9 +79,9 @@ CoordBase_SetupMask (CCTK_ARGUMENTS) CCTK_VInfo (CCTK_THORNSTRING, "Setting boundary points in direction %d face %d to weight 0", d, f); } - for (k=imin[2]; k<imax[2]; ++k) { - for (j=imin[1]; j<imax[1]; ++j) { - for (i=imin[0]; i<imax[0]; ++i) { + for (k=bmin[2]; k<bmax[2]; ++k) { + for (j=bmin[1]; j<bmax[1]; ++j) { + for (i=bmin[0]; i<bmax[0]; ++i) { int const ind = CCTK_GFINDEX3D (cctkGH, i, j, k); weight[ind] = 0.0; @@ -105,12 +111,12 @@ CoordBase_SetupMask (CCTK_ARGUMENTS) /* Adapt the extent of the boundary */ if (f==0) { /* lower face */ - imin[d] = imax[d]; - imax[d] = imin[d] + 1; + bmin[d] = bmax[d]; + bmax[d] = bmin[d] + 1; } else { /* upper face */ - imax[d] = imin[d]; - imin[d] = imax[d] - 1; + bmax[d] = bmin[d]; + bmin[d] = bmax[d] - 1; } /* Loop over the points next to boundary */ @@ -118,9 +124,9 @@ CoordBase_SetupMask (CCTK_ARGUMENTS) CCTK_VInfo (CCTK_THORNSTRING, "Setting non-staggered boundary points in direction %d face %d to weight 1/2", d, f); } - for (k=imin[2]; k<imax[2]; ++k) { - for (j=imin[1]; j<imax[1]; ++j) { - for (i=imin[0]; i<imax[0]; ++i) { + for (k=bmin[2]; k<bmax[2]; ++k) { + for (j=bmin[1]; j<bmax[1]; ++j) { + for (i=bmin[0]; i<bmax[0]; ++i) { int const ind = CCTK_GFINDEX3D (cctkGH, i, j, k); weight[ind] *= 0.5; |