BOUT-dev
BOUT-dev copied to clipboard
Mesh::iterateBndryUpperY vs RGN_UPPER_Y
Two things:
First, Mesh::iterateBndryUpperY
and associated functions return RangeIterators
that iterate between two x values, so in some sense they don't know how wide the boundaries are. As far as I can tell, (almost) everywhere they are used, they are used with mesh->yend+1
(or mesh->ystart-1 for lower y) -- except imex-bdf2.cxx, about L430, where they are used with mesh->yend/ystart
. Is this a bug?
Secondly, in BoutMesh::addBoundaryRegions
, RGN_UPPER/LOWER_Y
have the same y-ranges -- I think RGN_UPPER_Y
should be between yend+1, LocalNy-1
. Also, should these regions actually only have a single point in Y? I think Regions use inclusive end, so these should maybe be ystart-1, ystart-1
and yend+1, yend+1
.
Does this block v4.2?
Putting off for now till we get some tests on the places where these functions are used.