mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-13 14:40:35 +05:00
parallel trig-marking for bisection
This commit is contained in:
parent
0074d8b407
commit
e464fe9771
@ -1724,30 +1724,39 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
bool MarkHangingTris (T_MTRIS & mtris,
|
bool MarkHangingTris (T_MTRIS & mtris,
|
||||||
const INDEX_2_CLOSED_HASHTABLE<PointIndex> & cutedges)
|
const INDEX_2_CLOSED_HASHTABLE<PointIndex> & cutedges,
|
||||||
|
TaskManager tm)
|
||||||
{
|
{
|
||||||
bool hanging = false;
|
bool hanging = false;
|
||||||
// for (int i = 1; i <= mtris.Size(); i++)
|
// for (int i = 1; i <= mtris.Size(); i++)
|
||||||
for (auto & tri : mtris)
|
// for (auto & tri : mtris)
|
||||||
{
|
ParallelForRange
|
||||||
if (tri.marked)
|
(tm, mtris.Size(), [&] (size_t begin, size_t end)
|
||||||
{
|
{
|
||||||
hanging = true;
|
bool my_hanging = false;
|
||||||
continue;
|
for (size_t i = begin; i < end; i++)
|
||||||
}
|
{
|
||||||
for (int j = 0; j < 2; j++)
|
auto & tri = mtris[i];
|
||||||
for (int k = j+1; k < 3; k++)
|
if (tri.marked)
|
||||||
{
|
{
|
||||||
INDEX_2 edge(tri.pnums[j],
|
my_hanging = true;
|
||||||
tri.pnums[k]);
|
continue;
|
||||||
edge.Sort();
|
}
|
||||||
if (cutedges.Used (edge))
|
for (int j = 0; j < 2; j++)
|
||||||
{
|
for (int k = j+1; k < 3; k++)
|
||||||
tri.marked = 1;
|
{
|
||||||
hanging = true;
|
INDEX_2 edge(tri.pnums[j],
|
||||||
}
|
tri.pnums[k]);
|
||||||
}
|
edge.Sort();
|
||||||
}
|
if (cutedges.Used (edge))
|
||||||
|
{
|
||||||
|
tri.marked = 1;
|
||||||
|
my_hanging = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (my_hanging) hanging = true;
|
||||||
|
});
|
||||||
return hanging;
|
return hanging;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3476,7 +3485,7 @@ namespace netgen
|
|||||||
|
|
||||||
NgProfiler::StartTimer (timer1b);
|
NgProfiler::StartTimer (timer1b);
|
||||||
hangingsurf =
|
hangingsurf =
|
||||||
MarkHangingTris (mtris, cutedges) +
|
MarkHangingTris (mtris, cutedges, opt.task_manager) +
|
||||||
MarkHangingQuads (mquads, cutedges);
|
MarkHangingQuads (mquads, cutedges);
|
||||||
|
|
||||||
hangingedge = 0;
|
hangingedge = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user