From 0166fca8d415b5bd6997f4023c6ef3a302d61335 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Thu, 18 Oct 2012 14:18:36 +0000 Subject: [PATCH] search tree fix --- libsrc/meshing/meshing2.cpp | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/libsrc/meshing/meshing2.cpp b/libsrc/meshing/meshing2.cpp index d31c73e1..55539797 100644 --- a/libsrc/meshing/meshing2.cpp +++ b/libsrc/meshing/meshing2.cpp @@ -302,7 +302,8 @@ namespace netgen box.Set ( mesh[sel[0]] ); box.Add ( mesh[sel[1]] ); box.Add ( mesh[sel[2]] ); - surfeltree.Insert (box, i); + // surfeltree.Insert (box, i); + surfeltree.Insert (box, seia[i]); } @@ -1078,17 +1079,14 @@ namespace netgen { const Point3d & p = critpoints.Get(i); + for (int jj = 0; jj < intersecttrias.Size(); jj++) + { + // int j = intersecttrias.Get(jj); + // const Element2d & el = mesh.SurfaceElement(j); + + SurfaceElementIndex j = intersecttrias[jj]; + const Element2d & el = mesh[j]; - /* - for (j = 1; j <= mesh.GetNSE(); j++) - { - */ - int jj; - for (jj = 1; jj <= intersecttrias.Size(); jj++) - { - int j = intersecttrias.Get(jj); - const Element2d & el = mesh.SurfaceElement(j); - int ntrig = (el.GetNP() == 3) ? 1 : 2; int jl; @@ -1306,7 +1304,7 @@ namespace netgen box.Set (mesh[mtri[0]]); box.Add (mesh[mtri[1]]); box.Add (mesh[mtri[2]]); - surfeltree.Insert (box, mesh.GetNSE()); + surfeltree.Insert (box, mesh.GetNSE()-1); const Point3d & sep1 = mesh.Point (mtri.PNum(1)); const Point3d & sep2 = mesh.Point (mtri.PNum(2));