From ab7f1be9ab7b1bd6bc13d669d8b009dd190444bc Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Fri, 29 Apr 2022 12:23:26 +0200 Subject: [PATCH] fix topology for deprecated functions --- libsrc/meshing/topology.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libsrc/meshing/topology.cpp b/libsrc/meshing/topology.cpp index 18c80564..4fa3ac8a 100644 --- a/libsrc/meshing/topology.cpp +++ b/libsrc/meshing/topology.cpp @@ -1919,6 +1919,7 @@ namespace netgen return 6; } + void MeshTopology :: GetSurfaceElementEdges (int elnr, NgArray & eledges) const { int ned = GetNEdges (mesh->SurfaceElement(elnr).GetType()); @@ -2001,7 +2002,8 @@ namespace netgen if (surfedges.Get(elnr)[i] == -1) return i; eledges[i] = surfedges.Get(elnr)[i]+1; // orient[i] = (surfedges.Get(elnr)[i].orient) ? -1 : 1; - orient[i] = GetSurfaceElementEdgeOrientation(elnr, i) ? -1 : 1; + // orient[i] = GetSurfaceElementEdgeOrientation(elnr, i) ? -1 : 1; + orient[i] = 1; } } @@ -2029,7 +2031,8 @@ namespace netgen eledges[0] = segedges.Get(elnr)+1; if (orient) // orient[0] = segedges.Get(elnr).orient ? -1 : 1; - orient[0] = GetSegmentEdgeOrientation(elnr) ? -1 : 1; + // orient[0] = GetSegmentEdgeOrientation(elnr) ? -1 : 1; + orient[0] = 1; } return 1; } @@ -2346,7 +2349,7 @@ namespace netgen int MeshTopology :: GetVerticesEdge ( int v1, int v2 ) const { - NgArray elementedges; + // NgArray elementedges; // Array elements_v1; // GetVertexElements ( v1, elements_v1); auto elements_v1 = GetVertexElements ( v1 ); @@ -2354,10 +2357,11 @@ namespace netgen for ( int i = 0; i < elements_v1.Size(); i++ ) { - GetElementEdges( elements_v1[i]+1, elementedges ); + // GetElementEdges( elements_v1[i]+1, elementedges ); + auto elementedges = GetEdges(ElementIndex(elements_v1[i])); for ( int ed = 0; ed < elementedges.Size(); ed ++) { - GetEdgeVertices( elementedges[ed], edv1, edv2 ); + GetEdgeVertices( elementedges[ed]+1, edv1, edv2 ); if ( ( edv1 == v1 && edv2 == v2 ) || ( edv1 == v2 && edv2 == v1 ) ) return elementedges[ed]; }