Skip to content
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

Fix angleEdge at culled mesh boundaries #580

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xylar
Copy link
Collaborator

@xylar xylar commented Sep 6, 2024

Before this fix, angleEdge was simply copied from the base mesh to the culled mesh. With this change, angleEdge is flipped by pi radians if either the first cell on the given edge was removed (so the second cell is now the first cell after culling) or if only the second cell existed before (and after culling it is now the first cell). This is because angleEdge on a boundary edge always corresponds to a normal vector pointing from the first (and only) cell on the edge to the middle of the edge.

Before this fix, `angleEdge` was simply copied from the base mesh
to the culled mesh.  With this change, `angleEdge` is flipped by
pi radians if either the first cell on the given edge was removed
(so the second cell is now the first cell after culling) or if
only the second cell existed before (and after culling it is now
the first cell).  This is because `angleEdge` on a boundary edge
always corresponds to a normal vector pointing from the first
(and only) cell on the edge to the middle of the edge.
@xylar
Copy link
Collaborator Author

xylar commented Sep 6, 2024

Unfortunately, this didn't fix reconstruction of a constant zonal velocity in my testing so I have more work to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant