[Users] normal vector when looping over boundary using CCTK_LOOP3_BND
rhaas at illinois.edu
Thu May 7 01:42:10 CDT 2020
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
Looking at the code in flesh/src/include/cctk_Loop.h shows that ni is
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.
Now my question is how am I supposed to find out which boundary I am
at (lower or upper)?
My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu .
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 833 bytes
Desc: OpenPGP digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20200507/5b8f8e80/attachment.bin
More information about the Users