Merge branch 'fix_identification_prolongation' into 'master'

fix primary face computation in identification

See merge request ngsolve/netgen!639
This commit is contained in:
Hochsteger, Matthias 2024-03-06 12:21:50 +01:00
commit 989216178a

View File

@ -313,23 +313,14 @@ namespace netgen
{ {
bool need_inverse = ident.from == s.get(); bool need_inverse = ident.from == s.get();
auto other = need_inverse ? ident.to : ident.from; auto other = need_inverse ? ident.to : ident.from;
if(other->nr <= s->primary->nr) if(other->primary->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)
{ {
auto trafo = ident.trafo; auto trafo = ident.trafo;
if(need_inverse) if(need_inverse)
trafo = trafo.CalcInverse(); trafo = trafo.CalcInverse();
s->primary = other->primary; s->primary = other->primary;
s->primary_to_me.Combine(trafo, other->primary_to_me); s->primary_to_me.Combine(trafo, other->primary_to_me);
changed = other->primary->nr != s->primary->nr; changed = true;
} }
} }
} }