GmshRecorder: write 20-node hex as MSH type 17 with correct mid-edge node order#32
Open
nmorabowen wants to merge 1 commit into
Open
GmshRecorder: write 20-node hex as MSH type 17 with correct mid-edge node order#32nmorabowen wants to merge 1 commit into
nmorabowen wants to merge 1 commit into
Conversation
…ode order GmshRecorder mapped ELE_TAG_Twenty_Node_Brick to GMSH_QUADRATIC_HEXAHEDRON (MSH type 12), which is the 27-node hexahedron, and then emitted the element's 20 nodes in raw getExternalNodes() order. Gmsh therefore rejected the mesh: type 12 expects 27 nodes, and even truncated the mid-edge node order does not match the type-17 convention. Fix: add the MSH type-17 (20-node serendipity hex) enum, map Twenty_Node_Brick to it, and permute the twelve mid-edge nodes from the OpenSees serendipity ordering (shp3dv.cpp) to the Gmsh hex20 ordering when writing. The eight corner nodes already agree. Non-hex20 elements are unaffected. Note: the sibling 20-node classes TwentyNodeBrick, TwentyNodeBrick_u_p_U and TotalLagrangianFD20NodeBrick are still mapped to type 12 and likely need the same treatment, but their node orderings were not verified here, so they are left unchanged. Co-authored-by: Patricio Palacios <pxpalacios@miuandes.cl> Co-authored-by: Jose A. Abell <jaabell@miuandes.cl>
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.
GmshRecordermappedELE_TAG_Twenty_Node_BricktoGMSH_QUADRATIC_HEXAHEDRON(MSH type 12, the 27-node hex) and emitted the element's 20 nodes in rawgetExternalNodes()order. Gmsh rejects that mesh: type 12 expects 27 nodes, and the mid-edge order doesn't match the type-17 convention anyway.Fix
Twenty_Node_Brickto it.shp3dv.cpp) to the Gmsh hex20 ordering. The eight corners already agree; non-hex20 elements are untouched.Not addressed
The sibling 20-node classes
TwentyNodeBrick,TwentyNodeBrick_u_p_U,TotalLagrangianFD20NodeBrickare still mapped to type 12 and likely need the same fix, but their node orderings weren't verified here, so they're left unchanged rather than guessed.Authors: Nicolas Mora Bowen, Patricio Palacios, José A. Abell