mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-13 22:50:33 +05:00
more ParallelFor in update topology
This commit is contained in:
parent
e009a8b687
commit
a7b413944d
@ -546,10 +546,6 @@ namespace netgen
|
|||||||
if (edge.I1() != i) continue;
|
if (edge.I1() != i) continue;
|
||||||
|
|
||||||
int edgenum = edgenr[edge.I2()];
|
int edgenum = edgenr[edge.I2()];
|
||||||
/*
|
|
||||||
if (edgedir) edgenum *= -1;
|
|
||||||
edges[elnr][k] = edgenum;
|
|
||||||
*/
|
|
||||||
edges[elnr][k].nr = edgenum-1;
|
edges[elnr][k].nr = edgenum-1;
|
||||||
edges[elnr][k].orient = edgedir;
|
edges[elnr][k].orient = edgedir;
|
||||||
}
|
}
|
||||||
@ -573,8 +569,6 @@ namespace netgen
|
|||||||
if (edge.I1() != i) continue;
|
if (edge.I1() != i) continue;
|
||||||
|
|
||||||
int edgenum = edgenr[edge.I2()];
|
int edgenum = edgenr[edge.I2()];
|
||||||
// if (edgedir) edgenum *= -1;
|
|
||||||
// surfedges.Elem(elnr)[k] = edgenum;
|
|
||||||
surfedges[elnr][k].nr = edgenum-1;
|
surfedges[elnr][k].nr = edgenum-1;
|
||||||
surfedges[elnr][k].orient = edgedir;
|
surfedges[elnr][k].orient = edgedir;
|
||||||
}
|
}
|
||||||
@ -593,10 +587,6 @@ namespace netgen
|
|||||||
if (edge.I1() != i) continue;
|
if (edge.I1() != i) continue;
|
||||||
|
|
||||||
int edgenum = edgenr[edge.I2()];
|
int edgenum = edgenr[edge.I2()];
|
||||||
/*
|
|
||||||
if (edgedir) edgenum *= -1;
|
|
||||||
segedges.Elem(elnr) = edgenum;
|
|
||||||
*/
|
|
||||||
segedges[elnr].nr = edgenum-1;
|
segedges[elnr].nr = edgenum-1;
|
||||||
segedges[elnr].orient = edgedir;
|
segedges[elnr].orient = edgedir;
|
||||||
}
|
}
|
||||||
@ -690,7 +680,6 @@ namespace netgen
|
|||||||
});
|
});
|
||||||
cnt[v] = cnti;
|
cnt[v] = cnti;
|
||||||
}
|
}
|
||||||
cout << "myrange = " << begin << " - " << end << endl;
|
|
||||||
} );
|
} );
|
||||||
NgProfiler::StopTimer (timer2b1);
|
NgProfiler::StopTimer (timer2b1);
|
||||||
|
|
||||||
@ -704,7 +693,15 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
face2vert.SetSize(nfa);
|
face2vert.SetSize(nfa);
|
||||||
|
|
||||||
for (auto v : mesh.Points().Range())
|
// for (auto v : mesh.Points().Range())
|
||||||
|
|
||||||
|
ParallelForRange
|
||||||
|
(tm, mesh.Points().Size(),
|
||||||
|
[&] (size_t begin, size_t end)
|
||||||
|
{
|
||||||
|
INDEX_3_CLOSED_HASHTABLE<int> vert2face(2*max_face_on_vertex+10);
|
||||||
|
for (PointIndex v = begin+PointIndex::BASE;
|
||||||
|
v < end+PointIndex::BASE; v++)
|
||||||
{
|
{
|
||||||
int first_fa = cnt[v];
|
int first_fa = cnt[v];
|
||||||
int nfa = first_fa;
|
int nfa = first_fa;
|
||||||
@ -765,7 +762,7 @@ namespace netgen
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
/*
|
/*
|
||||||
int oldnfa = face2vert.Size();
|
int oldnfa = face2vert.Size();
|
||||||
int nfa = oldnfa;
|
int nfa = oldnfa;
|
||||||
|
Loading…
Reference in New Issue
Block a user