#617: Norm of NxNx1 grid gives poison in new version of Carpet ---------------------+------------------------------------------------------ Reporter: hinder | Owner: eschnett Type: defect | Status: review Priority: minor | Milestone: Component: Carpet | Version: Resolution: | Keywords: regression ---------------------+------------------------------------------------------ Changes (by eschnett):
* status: new => review
Comment:
As I mention above, your domain extent in the z direction is 3; you have 1 interior point, and 1 boundary point on every face. You can set boundary_size_z_{lower|upper} to 0 if you truly want an NxNx1 domain. Note that you still either need the shiftout to be 1 for both upper and lower z face, or you need to declare this as internal boundary.
Please try this patch to correct the problem I mention above:
{{{ $ hg diff . diff -r 682146b9a530 Carpet/CarpetReduce/src/mask_coords.c --- a/Carpet/CarpetReduce/src/mask_coords.c Sat Dec 10 19:21:28 2011 -0500 +++ b/Carpet/CarpetReduce/src/mask_coords.c Mon Dec 12 14:27:20 2011 -0500 @@ -134,8 +134,12 @@ 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 }}}