From 5c4b0e490a02db77fe6bd1fce929263a3b2b7cab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Sch=C3=B6berl?= Date: Sun, 29 Sep 2019 10:54:55 +0200 Subject: [PATCH] little polish --- libsrc/general/template.hpp | 8 +++++++- libsrc/meshing/delaunay.cpp | 4 ++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/libsrc/general/template.hpp b/libsrc/general/template.hpp index 534fa6e6..afca79c7 100644 --- a/libsrc/general/template.hpp +++ b/libsrc/general/template.hpp @@ -166,13 +166,19 @@ public: friend ostream & operator<<(ostream & s, const INDEX_2 & i2); }; - + /* inline INDEX_2 Sort (const INDEX_2 & i2) { INDEX_2 tmp = i2; tmp.Sort(); return tmp; } + */ +inline INDEX_2 Sort (INDEX_2 i2) +{ + i2.Sort(); + return i2; +} inline bool operator< (const INDEX_2 ia, const INDEX_2 ib) { diff --git a/libsrc/meshing/delaunay.cpp b/libsrc/meshing/delaunay.cpp index 9aa14f81..4ae55439 100644 --- a/libsrc/meshing/delaunay.cpp +++ b/libsrc/meshing/delaunay.cpp @@ -790,9 +790,13 @@ namespace netgen double r2 = Dist2 (*pp[0], pc); if (hasclose) + /* for (int k = 1; k <= closesphere.GetArray().Size(); k++) { int csameind = closesphere.GetArray().Get(k); + */ + for (int csameind : closesphere.GetArray()) + { if (!insphere.IsIn(csameind) && fabs (r2 - radi2.Get(csameind)) < 1e-10 && Dist2 (pc, centers.Get(csameind)) < 1e-20)