Open brryan opened 2 months ago
IIRC @brryan, this code didn't work as written?
@lroberts36 Yes I hit a PARTHENON_FAIL("Proper nesting is not being respected.");
when trying this code snippet that I didn't understand. Reproducing your reply from #1090:
Yeah, as written it won't work for multi-tree forests or periodic boundaries. It is a one word change to make it correct when the neighbor logical location in the coordinates of the origin block is available though, I think.
but I didn't pursue this.
haha, if I had only documented what the magical "one word change" was...
We moved to a floating point scheme to test which neighbors are adjacent to a given meshblock for swarm communication patterns. @lroberts36 pointed out that this can probably also be done with tree-based integer logic. We don't do that currently but his example code is preserved here if we want to move to this in the future.