-
Notifications
You must be signed in to change notification settings - Fork 0
Fix corner starts #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: add-periodic-corner-nbrs
Are you sure you want to change the base?
Conversation
niravshah241
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, looks good. Some quick formulae checks and making private members to public in partition.hpp have been suggested.
The unit tests for is_corner_neighbour and haloCornerBufferPositions (previously halo_corner_start) have been written in the branch add-periodic-corner-nbrs. (It will need some changes depending upon final function calls and index changes.)
Partitioner.cpp
Outdated
| start = left - d2.p1.x - 1; | ||
| // this second case works if the corner neighbour lies on the bottom edge (or in the | ||
| // corner of both e.g., the bottom left corner) | ||
| int dx = d1.p2.y - d2.p1.y; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be dx = d1.p2.x - d2.p1.x?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. I have either named dx incorrectly, or it should be d1.p2.x. I will double check these and get back to you
Partitioner.hpp
Outdated
| // Vector of maps of "corner" neighbours to their halo start indices after partitioning | ||
| std::vector<std::map<int, int>> _corner_send_pos_p = std::vector<std::map<int, int>>(NNBRS); | ||
|
|
||
| private: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we necessarily need private here? If no, it would be better (at least for the unit tests) if the functions is_neighbour , is_corner_neighbour, haloBufferPositions and haloCornerBufferPositions are made public.
0e4179e to
66cd9d5
Compare
WIP
This is an initial implementation of the correct halo send positions for corner neighbours
TODO:
haloCornerBufferPositionsandhaloBufferPositionsfunctionshaloCornerBufferPositionsfor periodic corner neighbourstest_halo_corner_starttest is failing