diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2012-01-11 16:02:48 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2012-09-11 18:15:42 +0100 |
commit | 1866c52c13670a26b1ca560c263d9a896e73a0d8 (patch) | |
tree | ace55d7df16be3640a4d5773e807c22cc45f2374 /Carpet/CarpetReduce | |
parent | f319c3712bd2aaa846a8b6f732641f105ab12a9e (diff) |
CarpetReduce: Set up weight function correctly for 2D domains
Diffstat (limited to 'Carpet/CarpetReduce')
-rw-r--r-- | Carpet/CarpetReduce/src/mask_coords.c | 6 |
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 |