aboutsummaryrefslogtreecommitdiff
path: root/Carpet/CarpetReduce
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@cct.lsu.edu>2012-01-11 16:02:48 -0500
committerErik Schnetter <schnetter@cct.lsu.edu>2012-01-11 16:02:48 -0500
commitc602c5f29b37f3dfdf236d9215846d4028837ba1 (patch)
treec9987c9d6df701bd21edbb71795e4245e70cc64d /Carpet/CarpetReduce
parentda370825f20d32e867cd04e1820ebf8fd73ebc7c (diff)
CarpetReduce: Set up weight function correctly for 2D domains
Diffstat (limited to 'Carpet/CarpetReduce')
-rw-r--r--Carpet/CarpetReduce/src/mask_coords.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/Carpet/CarpetReduce/src/mask_coords.c b/Carpet/CarpetReduce/src/mask_coords.c
index b945f6e1c..7836d2aa8 100644
--- a/Carpet/CarpetReduce/src/mask_coords.c
+++ b/Carpet/CarpetReduce/src/mask_coords.c
@@ -134,8 +134,12 @@ CoordBase_SetupMask (CCTK_ARGUMENTS)
directly on the boundary the weight 1/2 */
if (! is_staggered[2*d+f]) {
+ /* Since we are going to cut off 1/2 at each boundary, the
+ domain size must be at least 1 to begin with */
+ assert (int_points[d] >= 1);
+
/* Check whether the domain is empty */
- if (int_points[d] == 0) {
+ if (int_points[d] == 1) {
/* The domain is empty. The correct thing to do would be
to set the weights to 0. But this is boring, because