From d01f46c42581e445399dc31b23322e5246ecce3d Mon Sep 17 00:00:00 2001 From: JcDai Date: Wed, 23 Oct 2024 14:21:40 -0400 Subject: [PATCH] fix edgemesh collapse ve update --- src/wmtk/EdgeMeshOperationExecutor.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wmtk/EdgeMeshOperationExecutor.cpp b/src/wmtk/EdgeMeshOperationExecutor.cpp index a52cb760b4..c5fca4d8dc 100644 --- a/src/wmtk/EdgeMeshOperationExecutor.cpp +++ b/src/wmtk/EdgeMeshOperationExecutor.cpp @@ -247,7 +247,8 @@ Tuple EdgeMesh::EdgeMeshOperationExecutor::collapse_edge_single_mesh() // update ve { - ve_accessor.index_access().scalar_attribute(m_spine_vids[1]) = m_neighbor_eids[1]; + ve_accessor.index_access().scalar_attribute(m_spine_vids[1]) = + (m_neighbor_eids[1] != -1) ? m_neighbor_eids[1] : m_neighbor_eids[0]; } update_cell_hash();