mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-15 02:18:33 +05:00
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:
commit
fb39692f9c
@ -335,6 +335,20 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
static Timer tim("PointFunction - build elementsonpoint table"); RegionTimer reg(tim);
|
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(),
|
elementsonpoint = ngcore::CreateSortedTable<ElementIndex, PointIndex>( elements.Range(),
|
||||||
[&](auto & table, ElementIndex ei)
|
[&](auto & table, ElementIndex ei)
|
||||||
{
|
{
|
||||||
@ -344,6 +358,7 @@ namespace netgen
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
for (PointIndex pi : el.PNums())
|
for (PointIndex pi : el.PNums())
|
||||||
|
if(!non_tet_points[pi])
|
||||||
table.Add (pi, ei);
|
table.Add (pi, ei);
|
||||||
}, points.Size());
|
}, points.Size());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user