Don't do mesh smoothing at non-tet elements

This commit is contained in:
Hochsteger, Matthias 2024-09-27 16:29:47 +02:00 committed by Schöberl, Joachim
parent 13d962acdd
commit 61bed581ec

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());
}