diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-01-28 04:11:00 +0000 |
---|---|---|
committer | Erik Schnetter <schnetter@cct.lsu.edu> | 2008-01-28 04:11:00 +0000 |
commit | c1fe2d7dbd09dfb1fe0b2636529ab49aba48a3e9 (patch) | |
tree | a95685775eefc3e8fc4bb57b83a8939f55adfb2f /Carpet/CarpetRegrid2/src | |
parent | d995dc8dca72a6ba766ddf46aafd6ab6762ece2b (diff) |
CarpetRegrid2: Add new parameter "boundary_shiftout"
Add a new parameter "boundary_shiftout" which determines the number of
grid points added to the refinement boundary radius. This allows
refined regions which are larger or smaller than the radius by a
certain number of points.
darcs-hash:20080128041105-dae7b-77e435f5b46d6136b5eafff86796f97b46accc99.gz
Diffstat (limited to 'Carpet/CarpetRegrid2/src')
-rw-r--r-- | Carpet/CarpetRegrid2/src/regrid.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Carpet/CarpetRegrid2/src/regrid.cc b/Carpet/CarpetRegrid2/src/regrid.cc index eb4f9a087..f6a275dd9 100644 --- a/Carpet/CarpetRegrid2/src/regrid.cc +++ b/Carpet/CarpetRegrid2/src/regrid.cc @@ -287,12 +287,13 @@ namespace CarpetRegrid2 { rvect const rmax = centre.position + centre.radius.at(rl); // Convert to an integer bbox + ivect const istride = hh.baseextents.at(0).at(rl).stride(); ivect const imin = - rpos2ipos (rmin, origin, scale, hh, rl); + rpos2ipos (rmin, origin, scale, hh, rl) + - boundary_shiftout * istride; ivect const imax = - rpos2ipos1 (rmax, origin, scale, hh, rl); - - ivect const istride = hh.baseextents.at(0).at(rl).stride(); + rpos2ipos1 (rmax, origin, scale, hh, rl) + + boundary_shiftout * istride; ibbox const region (imin, imax, istride); |