TDycores-Project / TDycore

BSD 2-Clause "Simplified" License
4 stars 0 forks source link

Fixes the logic to arrange cells in circular order #175

Closed bishtgautam closed 3 years ago

bishtgautam commented 3 years ago

The updated code now puts the cells with minimum numbers of neighbors at the start and end of array containing the cells ids that needed to be rearranged. The rearranged array is next sorted to ensure cell i and i+1 are neighbors.

jeff-cohere commented 3 years ago

Hey Gautam,

This looks like it does what you say it does. Is this tested by anything that assumes the cells are in such an order? Should we add a test for it, maybe?

bishtgautam commented 3 years ago

There is code, which isn't updated in this PR, that checks to make sure that the sorted cells are such that i and i+1 are neighbors.

bishtgautam commented 3 years ago

@jeff-cohere I made a new commit to address your comments.