You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Investigate possible bug when handling non-contiguous node tags in Gmsh parser #96
Importing a Gmsh mesh with gaps in its node tags might creates extra, disconnected nodes in the solver matrix. A heat-conduction solve using Jacobi then might divide by zero and return NaN temperatures.
Confirmed and fixed. The Gmsh reader stored node coordinates at nodeTag - 1, so gaps in the node tags created extra nodes that no element uses. Their rows in the system matrix were all zeros: Jacobi divided by zero and returned NaN at every node, and the LU solver failed outright. The reader now detects gaps from the $Nodes header (max tag > number of nodes) and maps node tags to compact indices, including in element and boundary references. Meshes with contiguous tags, which is the usual Gmsh output, are read exactly as before.
A new unit test (tests/unit/gmshReader.test.js) copies the test meshes with gaps in their node tags and checks that the nodes, connectivity and solution are unchanged.
Activity
Fix non-contiguous node tags in the Gmsh reader (#96)
nikoscham commentedon Oct 28, 2026
Confirmed and fixed. The Gmsh reader stored node coordinates at nodeTag - 1, so gaps in the node tags created extra nodes that no element uses. Their rows in the system matrix were all zeros: Jacobi divided by zero and returned NaN at every node, and the LU solver failed outright. The reader now detects gaps from the $Nodes header (max tag > number of nodes) and maps node tags to compact indices, including in element and boundary references. Meshes with contiguous tags, which is the usual Gmsh output, are read exactly as before.
A new unit test (tests/unit/gmshReader.test.js) copies the test meshes with gaps in their node tags and checks that the nodes, connectivity and solution are unchanged.
Fix non-contiguous node tags in the Gmsh reader (#96) (#98)