- removed comment
Norm of NxNx1 grid gives poison in new version of Carpet
I am having a problem with a 2D Carpet unigrid simulation with NxNx1 grid points in each direction. I have 0 boundary points and 0 ghost points in the z direction. The norm2 and other norms computed by CarpetIOBasic and CarpetIOScalar are showing poison. The same happens if I use one boundary point and one ghost point. The important feature is that zmin = zmax. If I make zmax = zmin + dz, then the norms are fine. This works fine in the git version of Carpet - it seems to be a regression in the Mercurial version.
Parameter file is attached.
Keyword: regression
Comments (5)
-
-
- changed status to open
- removed 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
-
- removed comment
Did you have the opportunity to try this patch Ian?
-
reporter - changed status to resolved
- removed comment
It was committed already:
Author: Erik Schnetter <schnetter@cct.lsu.edu> Date: Wed Jan 11 16:02:48 2012 -0500
CarpetReduce: Set up weight function correctly for 2D domains
I have just tried it, and it works now.
-
- edited description
- changed status to closed
- Log in to comment
Note: Your parameter file has 1 boundary point in the z direction, not 0, i.e. your grid should be NxNx3.
However, this doesn't change things. Since 3D norms are ill-defined in this case (the 3D volume of the domain is 0), Carpet recognises this and switches to a 2D interpretation. Maybe this is broken.