From 873de8149c33a4f66334ad3a5cba889c6d5767f6 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Thu, 10 Jun 2021 09:42:04 +0200 Subject: [PATCH] thread-safe delaunay --- libsrc/meshing/delaunay.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libsrc/meshing/delaunay.cpp b/libsrc/meshing/delaunay.cpp index 8bee0775..0bf229f9 100644 --- a/libsrc/meshing/delaunay.cpp +++ b/libsrc/meshing/delaunay.cpp @@ -233,7 +233,7 @@ namespace netgen NgArray > & centers, NgArray & radi2, NgArray & connected, NgArray & treesearch, NgArray & freelist, SphereList & list, - IndexSet & insphere, IndexSet & closesphere) + IndexSet & insphere, IndexSet & closesphere, Array & newels) { static Timer t("Meshing3::AddDelaunayPoint");// RegionTimer reg(t); // static Timer tsearch("addpoint, search"); @@ -399,8 +399,6 @@ namespace netgen } } // while (changed) - // NgArray newels; - static NgArray newels; newels.SetSize(0); Element2d face(TRIG); @@ -684,6 +682,7 @@ namespace netgen for (PointIndex pi : mesh.Points().Range().Modify(0, -4)) mixed[pi] = PointIndex ( (prim * pi) % np + PointIndex::BASE ); + Array newels; // for (PointIndex pi = mesh.Points().Begin(); pi < mesh.Points().End()-4; pi++) for (PointIndex pi : mesh.Points().Range().Modify(0, -4)) { @@ -710,7 +709,7 @@ namespace netgen AddDelaunayPoint (newpi, newp, tempels, mesh, tettree, meshnb, centers, radi2, - connected, treesearch, freelist, list, insphere, closesphere); + connected, treesearch, freelist, list, insphere, closesphere, newels); }