-
Notifications
You must be signed in to change notification settings - Fork 33
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
patchkernel: keep track of vertices owners #80
Conversation
edb0478
to
1c508b4
Compare
df6ad38
to
9b6e8e8
Compare
4ef01aa
to
f17e9a3
Compare
f17e9a3
to
1604ed7
Compare
1604ed7
to
d252360
Compare
@@ -2947,6 +3234,54 @@ std::vector<int> PatchKernel::getNeighbourRanks() | |||
return neighRanks; | |||
} | |||
|
|||
/*! | |||
Gets a constant reference to the ghost targets needed for data exchange. | |||
|
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.
A comment here can help to understand better what are ghost targets. Something like:
For each source rank (key of the returned map) the ordered list of the local ids of the ghost vertices is provided. These vertices are involved as targets in a send/receive data exchange. Targets ghost vertices on a receiving rank have the same order of the source vertices on the related sending rank.
Maybe, it can be written more clearly....
|
||
/*! | ||
Gets a constant reference to the ghost sources needed for data exchange. | ||
|
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.
The same as for target vertices.
Here, we can also add a comment explaining that the sources are internal vertices and not ghost vertices.
Sources ids are the ids of the local vertices, owned by the current rank, that are involved as sources in data exchange for each receving rank.
// | ||
// Identify exchange sources | ||
// | ||
// Since vertices are shared among elements, data exchange does not involve |
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.
This comment is really clear, maybe can be included in some method documentation?
For instance in a getGhostTarget/SourceVertexExchangeInfo()? Or in the documentation of this method?
Does it make sense?
f3223b7
to
bc893c6
Compare
…of 'restoreVertex'
…only for non-MPI builds
bc893c6
to
32bde41
Compare
Each vertex is now associated with a processor, that processor is the owner of the vertex. Given the owners of the cells in one-ring neighborhood of a vertex, the owner of the vertex is the processor with the lowest rank.
Like for the cells, data structures for ghost data exchange are built also for the vertices.