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 | |
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
-rw-r--r-- | Carpet/CarpetRegrid2/param.ccl | 5 | ||||
-rw-r--r-- | Carpet/CarpetRegrid2/src/regrid.cc | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/Carpet/CarpetRegrid2/param.ccl b/Carpet/CarpetRegrid2/param.ccl index affc8103f..47cc3e72a 100644 --- a/Carpet/CarpetRegrid2/param.ccl +++ b/Carpet/CarpetRegrid2/param.ccl @@ -26,6 +26,11 @@ BOOLEAN snap_to_coarse "Ensure that the fine grid extent coincides with coarse g { } "no" +CCTK_INT boundary_shiftout "Number of grid points added to the refinement boundary radius" STEERABLE=always +{ + *:* :: "" +} 0 + CCTK_INT regrid_every "Regrid every n time steps" STEERABLE=always 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); |