Skip to content

GmshRecorder: write 20-node hex as MSH type 17 with correct mid-edge node order#32

Open
nmorabowen wants to merge 1 commit into
jaabell:ladruñofrom
nmorabowen:up/03-gmsh-hex20
Open

GmshRecorder: write 20-node hex as MSH type 17 with correct mid-edge node order#32
nmorabowen wants to merge 1 commit into
jaabell:ladruñofrom
nmorabowen:up/03-gmsh-hex20

Conversation

@nmorabowen

Copy link
Copy Markdown

GmshRecorder mapped ELE_TAG_Twenty_Node_Brick to GMSH_QUADRATIC_HEXAHEDRON (MSH type 12, the 27-node hex) and emitted the element's 20 nodes in raw getExternalNodes() order. Gmsh rejects that mesh: type 12 expects 27 nodes, and the mid-edge order doesn't match the type-17 convention anyway.

Fix

  • Add the MSH type 17 (20-node serendipity hex) enum.
  • Map Twenty_Node_Brick to it.
  • When writing a type-17 element, permute the twelve mid-edge nodes from the OpenSees serendipity ordering (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, TotalLagrangianFD20NodeBrick are 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

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant