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
Add function to update ghosts using a list of destinations #1903
Conversation
{ return f0 ? false : f1; }); | ||
|
||
// Remove remote exterior domain facets from candidates | ||
// Note: std::vector<bool> cannot be converted to span<bool>, using |
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.
Feel free to change functions that return std::vector<bool>
to std::vector<std::int8_t>
if it makes code simpler. It will probably be faster too.
/// @param[in] mesh The mesh | ||
/// @param[in] dest Destination rank for mesh cells owned by this rank | ||
/// @return Mesh with new ghosts | ||
mesh::Mesh update_ghosts(const mesh::Mesh& mesh, |
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 function name doesn't see right to me. It's not updating a mesh, but creating a new one.
I'm also not sure why one would use the function. Should it really work on a Topology object and return a new Topology object that can then me used to build a Mesh?
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.
At first I thought about modifying the mesh object, but the topology has some states (connectivities, entities) that could be invalidated.
I'll modify (simplify) the function to return a new topology, which could be used later for constructing a new mesh.
This is part 1 of a series of PR (2 or 3)
In this PR we add a function update the ghosts given the destination of owned cells.
User can remove or add new ghosts by updating the destination of the owned cells.
Also we have added a function to compute the interface facets between adjacent processes.
This function can be used to apply interface conditions in additive schwarz methods, or to compute a new layer of ghosts (will be used in the next PR).