-
Notifications
You must be signed in to change notification settings - Fork 37
WIP: Update ownership model to work in general forests and show tri-valent singular node fixup #1250
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
for (int point = 0; point < 2 * nblocks; ++point) { | ||
nodes[point] = Node::create(point, {-std::sin(point * M_PI / nblocks) + xoffset, | ||
-std::cos(point * M_PI / nblocks) + yoffset}); | ||
} | ||
|
||
using edge_t = parthenon::forest::Edge; | ||
for (int point = 0; point < 2 * nblocks; ++point) { | ||
forest_def.AddBC( | ||
edge_t({nodes[point % (2 * nblocks)], nodes[(point + 1) % (2 * nblocks)]})); | ||
} |
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.
Are both nodes and edges required to define the forest? Or are you using nodes to define the edges?
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 forest is defined by a set of nodes, faces defined by an ordered set of four nodes, and boundary conditions on edges defined by a set of two nodes.
PR Summary
Previously, the ownership model for shared elements was not updated to deal with general forests and non-trivial logical coordinate transformations between neighboring blocks. This PR inserts the necessary transformations to the ownership array so that everything is consistent.
Additionally, in the boundary communication example, we implement the fixup/internal boundary condition for nodal fields at tri-valent singular nodes in the forest as shown in the diagram below in the routine
FixTrivalentNodes2D
.This seems to give reasonable results for communicating boundary coordinates on this box mesh:
grid_explosion.pdf
PR Checklist