mirror of
https://github.com/NGSolve/netgen.git
synced 2025-05-14 14:40:48 +05:00
Blayers: Revert to old behavior for adding segments in case that insert_only_volume_elements is set
This commit is contained in:
parent
fed740b7b1
commit
3d3eecba3c
@ -1157,6 +1157,22 @@ void BoundaryLayerTool ::SetDomInOutSides ()
|
|||||||
|
|
||||||
void BoundaryLayerTool ::AddSegments ()
|
void BoundaryLayerTool ::AddSegments ()
|
||||||
{
|
{
|
||||||
|
if (insert_only_volume_elements)
|
||||||
|
{
|
||||||
|
if (params.disable_curving)
|
||||||
|
{
|
||||||
|
auto is_mapped = [&] (PointIndex pi) {
|
||||||
|
return pi >= mapto.Range().Next() || mapto[pi].Size() > 0;
|
||||||
|
};
|
||||||
|
for (auto& seg : old_segments)
|
||||||
|
if (is_mapped(seg[0]) || is_mapped(seg[1]))
|
||||||
|
{
|
||||||
|
seg.epgeominfo[0].edgenr = -1;
|
||||||
|
seg.epgeominfo[1].edgenr = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
auto& new_segs =
|
auto& new_segs =
|
||||||
insert_only_volume_elements ? new_segments_on_moved_bnd : new_segments;
|
insert_only_volume_elements ? new_segments_on_moved_bnd : new_segments;
|
||||||
|
|
||||||
@ -1425,6 +1441,11 @@ void BoundaryLayerTool ::Perform ()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// there is still a bug with segment edge numbers in moved boundaries.
|
||||||
|
// As a workaround, don't add them at all if only volume elements are inserted
|
||||||
|
if (insert_only_volume_elements)
|
||||||
|
mesh.LineSegments() = old_segments;
|
||||||
|
|
||||||
mesh.CalcSurfacesOfNode();
|
mesh.CalcSurfacesOfNode();
|
||||||
mesh.GetTopology().ClearEdges();
|
mesh.GetTopology().ClearEdges();
|
||||||
mesh.SetNextMajorTimeStamp();
|
mesh.SetNextMajorTimeStamp();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user