From c602c5f29b37f3dfdf236d9215846d4028837ba1 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 11 Jan 2012 16:02:48 -0500 Subject: CarpetReduce: Set up weight function correctly for 2D domains --- Carpet/CarpetReduce/src/mask_coords.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Carpet/CarpetReduce') 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 -- cgit v1.2.3