Merge branch 'skip_non_tet_points_in_smoothing' into 'master'

Don't do mesh smoothing at non-tet elements

See merge request ngsolve/netgen!675
This commit is contained in:
Schöberl, Joachim 2024-09-27 16:29:47 +02:00
commit fb39692f9c

View File

@ -335,6 +335,20 @@ namespace netgen
{
static Timer tim("PointFunction - build elementsonpoint table"); RegionTimer reg(tim);
Array<bool, PointIndex> non_tet_points(points.Size());
non_tet_points = false;
// Don't optimize if point is adjacent to a non-tet element
ParallelForRange(elements.Range(), [&] (auto myrange)
{
for(auto ei : myrange)
{
const auto & el = elements[ei];
if(el.NP()!=4)
for(auto pi : el.PNums())
non_tet_points[pi] = true;
}
});
elementsonpoint = ngcore::CreateSortedTable<ElementIndex, PointIndex>( elements.Range(),
[&](auto & table, ElementIndex ei)
{
@ -344,6 +358,7 @@ namespace netgen
return;
for (PointIndex pi : el.PNums())
if(!non_tet_points[pi])
table.Add (pi, ei);
}, points.Size());
}