-
Notifications
You must be signed in to change notification settings - Fork 35
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
Implement general 2D forest meshes #1047
Merged
Merged
Conversation
This file contains 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
lroberts36
changed the title
WIP: Thread relative block orientation through communication routines
WIP: Include relative block orientation transformations in communication routines
Apr 11, 2024
…6/add-forest-orientation-2
…rdinate transformation
…add-forest-orientation-2
lroberts36
changed the base branch from
lroberts36/add-forest-block-orientation
to
lroberts36/refactor-mesh-constructors
April 17, 2024 19:26
…add-forest-orientation-2
…add-forest-orientation-2
adamdempsey90
approved these changes
Jun 25, 2024
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.
Our 2 downstream codes run fine without modification.
12 tasks
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
This PR implements the minimum necessary technology for defining meshes based on generally connected forests of octrees. I have left details of coordinates to a future PR, so for now each tree must cover a hyper-rectangular domain defined by$\vec{x}_\text{min}$ and $\Delta \vec{x}$ . Some rough notes about my implementation are in ForestOfOctreesNotes.pdf, which is now also included in
doc/latex/main.pdf
.The four major things this PR accomplishes:
forest::Node
,forest::Edge
, andforest::Face
for defining the forest mesh topology.forest::Face
contains routines for finding neighbors and then calculating the correct logical coordinate transformations to those neighbors. For now, I have stuck to defining 2D forests but the mechanisms used here should generalize to 3D relatively easily in a future PR.forest::Forest::Make2D
that builds aForest
from aforest::ForestDefinition
.ForestDefinition
contains a set ofFaces
, boundary conditions defined onforest::Edge
s,RegionSize
s associated with each block, and a set of initialLogicalLocation
s to refine.Mesh
constructor as well asParthenonManager::ParthenonInitPackagesAndMesh
that takes aforest::ForestDefinition
and constructs a mesh based on a general 2D forest.Smaller things also included in the PR:
RelativeOrientation
->LogicalLocationCoordinateTransformation
for clarity.MeshBndryFnctn
toMesh::forest::trees
instead ofMesh
and add appropriate registration routines.gid
s and other information through boundaries to ensure that neighbor communication is occurring correctly. The gold file has just been verified by hand.Things this PR does not do (but maybe a future PR should):
MeshBlock
.Some examples of properly nested refinement near singular mesh points (this mesh configuration is tested in the newly added unit test):
Boundaries filled with neighbor gids in a 2x2 forest where the lower left tree coordinates are rotated by 90 degrees relative to the other trees (results of the boundary communication regression test):
PR Checklist