incorrect normal vector when looping over boundary using CCTK_LOOP3_BND

Create issue
Issue #2385 new
Roland Haas created an issue

I am trying to loop over the boundary of my domain using CCTK_LOOP3_BND(cckGH, i,j,k, ni,nj,nk). The documentation
says that "ni, nj, and nk are names of variables describing the (outwards pointing) normal direction to the boundary as well as the distance to the boundary."

However on a 5x5x5 grid and 1 boundary point in a uniprocess setup ni, nj, nk are either 0 or 1 but never eg -1 which I would expect for the lower boundary.

Looking at the code in flesh/src/include/cctk_Loop.h shows that ni iscomputed as

const int ni CCTK_ATTRIBUTE_UNUSED = cctki0_idir<0 ? i+1 : cctki0_idir==0 ? 0 : cctki0_imax-i;

ie by construction is always non-negative. LoopControl does the same.

Comments (0)

  1. Log in to comment