From 4da0b708f24c43892712a25ef826c599490d3933 Mon Sep 17 00:00:00 2001 From: zlyfunction Date: Wed, 18 Oct 2023 23:29:02 -0400 Subject: [PATCH] in find_local_switch_sequence_trimesh if source==target then return a empty sequence --- src/wmtk/multimesh/utils/find_local_switch_sequence.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wmtk/multimesh/utils/find_local_switch_sequence.cpp b/src/wmtk/multimesh/utils/find_local_switch_sequence.cpp index 393c50dc9a..131b15efdf 100644 --- a/src/wmtk/multimesh/utils/find_local_switch_sequence.cpp +++ b/src/wmtk/multimesh/utils/find_local_switch_sequence.cpp @@ -10,6 +10,9 @@ std::vector find_local_switch_sequence_trimesh( const Tuple& target) { // TODO: assert that base_source and base_target use the same global CID + if (source == target) { + return std::vector{}; + } // circulate Tuple cur_tuple = source;