Skip to content

fix: MeshDoctor: ensure consistent node numbering between 2D element and 3D faces#219

Merged
jafranc merged 10 commits intomainfrom
fix/bd713/consistent2Delemm_3Dface
Feb 5, 2026
Merged

fix: MeshDoctor: ensure consistent node numbering between 2D element and 3D faces#219
jafranc merged 10 commits intomainfrom
fix/bd713/consistent2Delemm_3Dface

Conversation

@bd713
Copy link
Contributor

@bd713 bd713 commented Feb 3, 2026

When splitting a mesh at fracture locations, node duplication mappings were only applied to 3D cells (volume elements). 2D cells (faces/surfaces) that share the same nodes were not updated, causing them to reference old node IDs after the split.

This PR ensures consistent node indexing across all cell dimensions, thus preventing geometric inconsistencies at fracture interfaces.

Note that neither this fix nor the original code guarantees the preservation of the original numbering after splitting.

Copy link

@jhuang2601 jhuang2601 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing it!

@paloma-martinez paloma-martinez added the test-geos-integration Triggers the testing of geosPythonPackages import and integration in GEOS CI label Feb 4, 2026
Copy link
Collaborator

@jafranc jafranc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great missing case

if neighborCell.GetCellDimension() == 3:
# This 3D cell has a mapping - use it for the 2D cell
if neighborId in cellToNodeMapping:
cell_2d_to_mapping[ c ] = dict( cellToNodeMapping[ neighborId ] )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't this add the full neighbor cell's mapping and not only the partial mapping for the 2d cell ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jafranc you are absolutely correct, this was a bit lazy on my part.
I removed these extra mappings for code clarity and memory efficiency.
Thanks for catching this!

bd713 and others added 6 commits February 4, 2026 10:08
Co-authored-by: Jacques Franc <49998870+jafranc@users.noreply.github.com>
Co-authored-by: Jacques Franc <49998870+jafranc@users.noreply.github.com>
Co-authored-by: paloma-martinez <104762252+paloma-martinez@users.noreply.github.com>
Co-authored-by: Jacques Franc <49998870+jafranc@users.noreply.github.com>
Co-authored-by: Jacques Franc <49998870+jafranc@users.noreply.github.com>
@jafranc jafranc merged commit d4d3abc into main Feb 5, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flag: ready for review test-geos-integration Triggers the testing of geosPythonPackages import and integration in GEOS CI type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants