Skip to content
Snippets Groups Projects
Commit dab7b668 authored by Franjo's avatar Franjo
Browse files

Cleanup of triSurfAddressing

parent 8a65401d
No related branches found
No related tags found
No related merge requests found
...@@ -81,28 +81,22 @@ void triSurfAddressing::calculateEdges() const ...@@ -81,28 +81,22 @@ void triSurfAddressing::calculateEdges() const
const label triI = pFacets(pI, pfI); const label triI = pFacets(pI, pfI);
const labelledTri& tri = facets_[triI]; const labelledTri& tri = facets_[triI];
label pos(-1);
forAll(tri, i) forAll(tri, i)
{ {
if( tri[i] == pI ) if( tri[i] == pI )
{ {
pos = i; if( tri[(i+1)%3] >= pI )
if( tri[(pos+1)%3] >= pI )
edgesAtPoint.insert edgesAtPoint.insert
( (
std::make_pair(pI, tri[(pos+1)%3]) std::make_pair(pI, tri[(i+1)%3])
); );
if( tri[(pos+2)%3] >= pI ) if( tri[(i+2)%3] >= pI )
edgesAtPoint.insert edgesAtPoint.insert
( (
std::make_pair(pI, tri[(pos+2)%3]) std::make_pair(pI, tri[(i+2)%3])
); );
} }
} }
} }
std::set<std::pair<label, label> >::const_iterator it; std::set<std::pair<label, label> >::const_iterator it;
...@@ -119,7 +113,6 @@ void triSurfAddressing::calculateEdges() const ...@@ -119,7 +113,6 @@ void triSurfAddressing::calculateEdges() const
# endif # endif
nEdgesForThread[threadI] = edgesHelper.size(); nEdgesForThread[threadI] = edgesHelper.size();
# ifdef USE_OMP # ifdef USE_OMP
# pragma omp critical # pragma omp critical
# endif # endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment