[MPI] Fix getCellRank in RegularGrid #1037
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi all,
This PR fixes the getCellRank method in the regular grid triangulation.
The former method would assign the rank of a cell by checking if all its vertices are either owned by the process or within the discrete bounding box of the process. This is a problem as a process may own a cell and own none of its vertices.
The new getCellRank method will check if the barycenter of the cell is within the floating point bounding box of the process.
In the ExplicitTriangulation, getCellRank has been also modified, so that the process that owns the cell is the process of lowest rank value.
This was tested by computing the ranks for vertices and cells on 8 processes and checking that all processes return the same rank for a given simplex on a$50^3$ data set.
Thanks for any feedback.