support for quad mesh in .inp files#116
Open
marinlauber wants to merge 2 commits intoJuliaIO:masterfrom
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #116 +/- ##
=======================================
Coverage 79.25% 79.25%
=======================================
Files 11 11
Lines 829 829
=======================================
Hits 657 657
Misses 172 172 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
SimonDanisch
reviewed
Apr 1, 2026
| nodes = parse.(Int,split(line,",")[2:end]) | ||
| push!(faces, TriangleFace{Int}(facetype([findfirst(==(node),node_idx) for node in nodes])...)) # parse the face | ||
| face_nodes = [findfirst(==(node),node_idx) for node in nodes] | ||
| push!(faces, NgonFace{length(face_nodes),Int}(face_nodes...)) # parse the face |
Member
There was a problem hiding this comment.
I think this means faces is now not concretely typed?
Contributor
Author
There was a problem hiding this comment.
Ahh true! Actually, I can use
push!(faces, facetype([findfirst(==(node),node_idx) for node in nodes]...)) # parse the facewith facetype = GLTriangleFace or facetype = Quads{Int} when required and it works.
Member
|
I think it would be nice to default to the face type the file gives, but maybe that should be a larger refactor where we do it for all types, and leave it like this for now? |
Contributor
Author
|
Thanks for the feedback. It shouldn't be too hard to do, I'll think about it. |
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.
This PR adds the capability to load
.inpmeshes defined using quadrilateral elements.This is achieved by replacing the hardcoded
GLTriangleFacewith anNgonFacethat generates the correct face dimension.The code still works for the classical triangular
.inpmesh.