mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
TableCreator -> CreateSortedTable()
This commit is contained in:
parent
073cbec108
commit
1045f68b97
@ -2100,37 +2100,27 @@ namespace netgen
|
||||
|
||||
t_table.Start();
|
||||
|
||||
TableCreator<ElementIndex, PointIndex> creator(np);
|
||||
auto elsonpoint = ngcore::CreateSortedTable<ElementIndex, PointIndex>( volelements.Range(),
|
||||
[&](auto & table, ElementIndex ei)
|
||||
{
|
||||
const Element & el = (*this)[ei];
|
||||
if (dom == 0 || dom == el.GetIndex())
|
||||
{
|
||||
if (el.GetNP() == 4)
|
||||
{
|
||||
INDEX_4 i4(el[0], el[1], el[2], el[3]);
|
||||
i4.Sort();
|
||||
table.Add (PointIndex(i4.I1()), ei);
|
||||
table.Add (PointIndex(i4.I2()), ei);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (PointIndex pi : el.PNums())
|
||||
table.Add(pi, ei);
|
||||
}
|
||||
}
|
||||
}, GetNP());
|
||||
|
||||
for ( ; !creator.Done(); creator++)
|
||||
// for (ElementIndex ei : Range(VolumeElements()))
|
||||
ParallelFor
|
||||
(Range(VolumeElements()), [&] (ElementIndex ei)
|
||||
{
|
||||
const Element & el = (*this)[ei];
|
||||
if (dom == 0 || dom == el.GetIndex())
|
||||
{
|
||||
if (el.GetNP() == 4)
|
||||
{
|
||||
INDEX_4 i4(el[0], el[1], el[2], el[3]);
|
||||
i4.Sort();
|
||||
creator.Add (PointIndex(i4.I1()), ei);
|
||||
creator.Add (PointIndex(i4.I2()), ei);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (PointIndex pi : el.PNums())
|
||||
creator.Add(pi, ei);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
auto elsonpoint = creator.MoveTable();
|
||||
|
||||
ParallelFor (Range(elsonpoint), [&] (auto i)
|
||||
{
|
||||
QuickSort(elsonpoint[i]);
|
||||
});
|
||||
|
||||
NgArray<int,PointIndex::BASE> numonpoint(np);
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user