-
Notifications
You must be signed in to change notification settings - Fork 525
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
Updates to mesh vertices and centroids #2711
Conversation
…nd spherical mesh.
I think we hashed a lot of this out offline @eepeterson. In addition to discussing #2720 and #2721, we settled on keeping FWIW, this is similar to the approach for the |
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.
LGTM!
Looking forward to making use of this new feature Would there be any benefit in renaming cylindrical_vertices to vertices _cylindrical Then it matches the first word of the strucutred mesh methods and might be more findable with tab complete Sorry I'm late to comment |
Good point! I'll make that update. Thanks @shimwell! |
Description
This PR adjusts the
vertices
andcentroid
properties on the Python API mesh classes s.t. they always return Cartesian coordinates for any mesh type. Methods for gettingvertices
andcentroid
coordinates in other systems have been added forCylindricalMesh
andSphericalMesh
.I've also updated the
UnstructuredMesh
vertices
,centroids
, andconnectivity
properties to return the same structure as the other classes with a shape (3, ...) so that they can be unpacked asx, y, z = mesh.centroids
when needed.Checklist
- [ ] I have run clang-format on any C++ source files (if applicable)- [ ] I have added tests that prove my fix is effective or that my feature works (if applicable)