From a70803eecb9b6f534c6cc74748556328524cd50c Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Tue, 10 Sep 2019 16:59:31 +0200 Subject: [PATCH] Fix BuildEdgeList() - create sorted list --- libsrc/meshing/improve3.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/libsrc/meshing/improve3.cpp b/libsrc/meshing/improve3.cpp index c841081d..0c48b38f 100644 --- a/libsrc/meshing/improve3.cpp +++ b/libsrc/meshing/improve3.cpp @@ -419,10 +419,12 @@ void MeshOptimize3d :: BuildEdgeList( const Mesh & mesh, const TABLE>> thread_edges(ngcore::TaskManager::GetMaxThreads()); + int ntasks = 2*ngcore::TaskManager::GetMaxThreads(); + Array>> task_edges(ntasks); - ParallelForRange(mesh.Points().Range(), [&] (auto myrange) + ParallelFor(IntRange(ntasks), [&] (int ti) { + auto myrange = mesh.Points().Range().Split(ti, ntasks); ArrayMem, 100> local_edges; for (auto pi : myrange) { @@ -449,17 +451,17 @@ void MeshOptimize3d :: BuildEdgeList( const Mesh & mesh, const TABLE