|
@@ -406,7 +406,9 @@ inline igl::SelfIntersectMesh<
|
|
|
map<typename CDT_plus_2::Vertex_handle,Index> v2i;
|
|
|
// Loop over offending triangles
|
|
|
const size_t noff = offending.size();
|
|
|
-# pragma omp parallel for if (noff>1000)
|
|
|
+ // Unfortunately it looks like CGAL has trouble allocating memory when
|
|
|
+ // multiple openmp threads are running. Crashes durring CDT...
|
|
|
+//# pragma omp parallel for if (noff>1000)
|
|
|
for(Index o = 0;o<(Index)noff;o++)
|
|
|
{
|
|
|
// index in F
|
|
@@ -441,7 +443,7 @@ inline igl::SelfIntersectMesh<
|
|
|
assert(T[f].vertex(i) == P[o].to_3d(vit->point()));
|
|
|
#endif
|
|
|
// For first three, use original index in F
|
|
|
-# pragma omp critical
|
|
|
+//# pragma omp critical
|
|
|
v2i[vit] = F(f,i);
|
|
|
}else
|
|
|
{
|
|
@@ -483,7 +485,7 @@ inline igl::SelfIntersectMesh<
|
|
|
if(vit_point_3 == P[no].to_3d(uit->point()))
|
|
|
{
|
|
|
assert(v2i.count(uit) == 1);
|
|
|
-# pragma omp critical
|
|
|
+//# pragma omp critical
|
|
|
v2i[vit] = v2i[uit];
|
|
|
found = true;
|
|
|
}
|
|
@@ -492,7 +494,7 @@ inline igl::SelfIntersectMesh<
|
|
|
}
|
|
|
if(!found)
|
|
|
{
|
|
|
-# pragma omp critical
|
|
|
+//# pragma omp critical
|
|
|
{
|
|
|
v2i[vit] = V.rows()+NV_count;
|
|
|
NV.push_back(vit_point_3);
|
|
@@ -507,7 +509,7 @@ inline igl::SelfIntersectMesh<
|
|
|
Index i = 0;
|
|
|
// Resize to fit new number of triangles
|
|
|
NF[o].resize(cdt[o].number_of_faces(),3);
|
|
|
-# pragma omp atomic
|
|
|
+//# pragma omp atomic
|
|
|
NF_count+=NF[o].rows();
|
|
|
// Append new faces to NF
|
|
|
for(
|