WIP: Update ownership model to work in general forests and show tri-valent singular node fixup - #1250
Open
lroberts36 wants to merge 22 commits into
Open
WIP: Update ownership model to work in general forests and show tri-valent singular node fixup#1250lroberts36 wants to merge 22 commits into
lroberts36 wants to merge 22 commits into
Conversation
Yurlungur
reviewed
May 9, 2025
Comment on lines
+92
to
+101
| 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)]})); | ||
| } |
Collaborator
There was a problem hiding this comment.
Are both nodes and edges required to define the forest? Or are you using nodes to define the edges?
Collaborator
Author
There was a problem hiding this comment.
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.
Collaborator
|
@lroberts36 what's the status of this? |
Collaborator
Author
It is complete and working, but I need to go back and decide on if I like some of the interface choices. |
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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