-
Notifications
You must be signed in to change notification settings - Fork 2
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
Generate a PyVista grid directly without meshio as intermediate step #451
Generate a PyVista grid directly without meshio as intermediate step #451
Conversation
Thanks for opening this pull request! Please check out our contributing guidelines. |
src/skgmsh/__init__.py
Outdated
element_types, element_tags, element_node_tags = gmsh.model.mesh.getElements() | ||
|
||
# Points | ||
assert (np.diff(node_tags) > 0).all() |
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.
Not sure if this is ever False. pygmsh
is checking whether tags are sorted, so I left it.
src/skgmsh/__init__.py
Outdated
cells = {} | ||
|
||
for type_, tags, node_tags in zip(element_types, element_tags, element_node_tags): | ||
assert (np.diff(tags) > 0).all() |
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.
Same here (seems to be always True).
for more information, see https://pre-commit.ci
…eurfonluu/scikit-gmsh into feature/generate-mesh-function
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.
Thanks! I'm really impressed with this improvement!
Congrats on merging your first pull request! We here at behaviorbot are proud of you! |
@all-contributors please add @keurfonluu for code |
I've put up a pull request to add @keurfonluu! 🎉 |
Overview
Conversion from gmsh API to PyVista grid is straightforward. There is no need to use
meshio.Mesh
as intermediate mesh. Bonus,pygmsh
is no longer required as dependency.Details
generate_mesh
.