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

Mesh::iterateBndryUpperY vs RGN_UPPER_Y

Open ZedThree opened this issue 6 years ago • 2 comments

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.

ZedThree avatar Jun 15 '18 15:06 ZedThree

Does this block v4.2?

d7919 avatar Sep 03 '18 11:09 d7919

Putting off for now till we get some tests on the places where these functions are used.

ZedThree avatar Oct 11 '18 13:10 ZedThree