-
Notifications
You must be signed in to change notification settings - Fork 94
refactor: Refactor/cleanup partitions #3609
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: develop
Are you sure you want to change the base?
Conversation
{ | ||
secondNeighborRanks.erase( neighbor.neighborRank() ); | ||
} | ||
|
||
for( integer const neighborRank : secondNeighborRanks ) | ||
{ | ||
m_neighbors.emplace_back( neighborRank ); | ||
neighbors.emplace_back( neighborRank ); |
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.
We used to have two versions of m_neighbors
: one in DomainPartition
, one in SpatialPartition
.
Despite sharing the same name, I have the impression that:
- the
SpatialPartition
version used to be a "strict" list of neighbors. - the
DomainPartition
version also appended the neighbors of neighbors.
After this refactoring, I understand only one version will remain. It will be stored in SpatialPartition
, and will now include the neighbors of neighbors.
If that's correct, this might conflict notably with the Particles machinery (e.g. SpatialPartition::repartitionMasterParticles
) which was relying so far on the "strict" definition of neighbors.
Best case scenario: the MPM will simply iterate over more neighbors for nothing.
NB: the CI tests for MPM may still run fine as they seem to use a 1x1x1 or 2x2x1 partition... meaning they won't generate neighbors of neighbors anyway.
This PR seeks to remove a redundant definition of
DomainPartition::m_neighbors
and use the one that exists inPartitionBase