BOUT-dev icon indicating copy to clipboard operation
BOUT-dev copied to clipboard

`Mesh::firstX()` doc is confusing

Open dschwoerer opened this issue 1 year ago • 1 comments

The documentation of Mesh::firstX() sounds like it would return always false for x-periodic grids, but it does not: https://github.com/boutproject/BOUT-dev/blob/master/src/mesh/impls/bout/boutmesh.hxx#L69 https://github.com/boutproject/BOUT-dev/blob/master/src/mesh/impls/bout/boutmesh.cxx#L1488

Is that intentional? Should I fix the comment?

dschwoerer avatar Oct 25 '24 11:10 dschwoerer

From a quick look, it seems most places are using it in the sense of the comment (that is, checking if there's a boundary, and if so, use one-sided differences), so I suspect that they wouldn't handle periodic X correctly/very well

ZedThree avatar Oct 25 '24 14:10 ZedThree