Mesh: merge coincident nodes, keeping tags and sets on the survivor

Model::merge_nodes replaces merged nodes by their survivors in elements (node
order kept, so face and edge tags hold) and in set node lists, moves a vertex
tag to an untagged survivor, and refuses a merge that would collapse an
element. fieldcraft_mesh::join::coincident_nodes / merge_coincident find the
nodes within a distance of a lower-labelled survivor, deterministically.
Meshing cell by cell and mirroring use them; node merging commands will too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
jyvikoandClaude Opus 5.5 authored and Irakli Kourtis committed 2026-10-14 19:50:37 -04:00
1 parent f6d227d8cb
commit 1fbb5581ea
3 files changed
+198 -2

No files matched your search

+5
View File
@@ -244,6 +244,11 @@ impl Classification {
self.elements.remove(&label);
}
/// Tag a node with a tag already interned (the caller checked both).
pub(crate) fn tag_node_unchecked(&mut self, label: u32, tag: u32) {
self.nodes.insert(label, tag);
}
pub(crate) fn forget_node(&mut self, label: u32) {
self.nodes.remove(&label);
}