From 5f0276179fec1894081aa45a34f2891154aeb453 Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Wed, 6 Mar 2024 12:12:34 +0100 Subject: [PATCH] fix primary face computation in identification --- libsrc/meshing/basegeom.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/libsrc/meshing/basegeom.cpp b/libsrc/meshing/basegeom.cpp index d1dfb8e3..4257e08d 100644 --- a/libsrc/meshing/basegeom.cpp +++ b/libsrc/meshing/basegeom.cpp @@ -313,23 +313,14 @@ namespace netgen { bool need_inverse = ident.from == s.get(); auto other = need_inverse ? ident.to : ident.from; - if(other->nr <= s->primary->nr) - { - auto trafo = ident.trafo; - if(need_inverse) - trafo = trafo.CalcInverse(); - s->primary = other; - s->primary_to_me.Combine(trafo, s->primary_to_me); - changed = other->nr != s->primary->nr; - } - if(other->primary->nr <= s->primary->nr) + if(other->primary->nr < s->primary->nr) { auto trafo = ident.trafo; if(need_inverse) trafo = trafo.CalcInverse(); s->primary = other->primary; s->primary_to_me.Combine(trafo, other->primary_to_me); - changed = other->primary->nr != s->primary->nr; + changed = true; } } }