little polish

This commit is contained in:
Joachim Schöberl 2019-09-29 10:54:55 +02:00
parent 940084e250
commit 5c4b0e490a
2 changed files with 11 additions and 1 deletions

View File

@ -166,13 +166,19 @@ public:
friend ostream & operator<<(ostream & s, const INDEX_2 & i2); friend ostream & operator<<(ostream & s, const INDEX_2 & i2);
}; };
/*
inline INDEX_2 Sort (const INDEX_2 & i2) inline INDEX_2 Sort (const INDEX_2 & i2)
{ {
INDEX_2 tmp = i2; INDEX_2 tmp = i2;
tmp.Sort(); tmp.Sort();
return tmp; return tmp;
} }
*/
inline INDEX_2 Sort (INDEX_2 i2)
{
i2.Sort();
return i2;
}
inline bool operator< (const INDEX_2 ia, const INDEX_2 ib) inline bool operator< (const INDEX_2 ia, const INDEX_2 ib)
{ {

View File

@ -790,9 +790,13 @@ namespace netgen
double r2 = Dist2 (*pp[0], pc); double r2 = Dist2 (*pp[0], pc);
if (hasclose) if (hasclose)
/*
for (int k = 1; k <= closesphere.GetArray().Size(); k++) for (int k = 1; k <= closesphere.GetArray().Size(); k++)
{ {
int csameind = closesphere.GetArray().Get(k); int csameind = closesphere.GetArray().Get(k);
*/
for (int csameind : closesphere.GetArray())
{
if (!insphere.IsIn(csameind) && if (!insphere.IsIn(csameind) &&
fabs (r2 - radi2.Get(csameind)) < 1e-10 && fabs (r2 - radi2.Get(csameind)) < 1e-10 &&
Dist2 (pc, centers.Get(csameind)) < 1e-20) Dist2 (pc, centers.Get(csameind)) < 1e-20)