From c1fe2d7dbd09dfb1fe0b2636529ab49aba48a3e9 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 28 Jan 2008 04:11:00 +0000 Subject: 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 --- Carpet/CarpetRegrid2/src/regrid.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Carpet/CarpetRegrid2/src') 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); -- cgit v1.2.3