mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-15 10:28:34 +05:00
Don't add new segments in blayer if 'only_add_volume_elements' is set
This commit is contained in:
parent
4f927f5469
commit
99be6bbc0e
@ -285,6 +285,7 @@ BoundaryLayerTool::BoundaryLayerTool(Mesh& mesh_,
|
|||||||
topo.SetBuildVertex2Element(true);
|
topo.SetBuildVertex2Element(true);
|
||||||
mesh.UpdateTopology();
|
mesh.UpdateTopology();
|
||||||
|
|
||||||
|
old_segments = mesh.LineSegments();
|
||||||
have_single_segments = HaveSingleSegments(mesh);
|
have_single_segments = HaveSingleSegments(mesh);
|
||||||
|
|
||||||
if (have_single_segments)
|
if (have_single_segments)
|
||||||
@ -1082,6 +1083,13 @@ void BoundaryLayerTool ::AddSegments()
|
|||||||
|
|
||||||
if (params.disable_curving)
|
if (params.disable_curving)
|
||||||
{
|
{
|
||||||
|
for (auto& seg : old_segments)
|
||||||
|
if (mapto[seg[0]].Size() || mapto[seg[1]].Size())
|
||||||
|
{
|
||||||
|
seg.epgeominfo[0].edgenr = -1;
|
||||||
|
seg.epgeominfo[0].edgenr = -1;
|
||||||
|
}
|
||||||
|
|
||||||
for (auto& seg : segments)
|
for (auto& seg : segments)
|
||||||
if (is_edge_moved[seg.si])
|
if (is_edge_moved[seg.si])
|
||||||
{
|
{
|
||||||
@ -1314,6 +1322,11 @@ void BoundaryLayerTool ::Perform()
|
|||||||
mesh[pi] += height * (*gw);
|
mesh[pi] += height * (*gw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (insert_only_volume_elements)
|
||||||
|
{
|
||||||
|
mesh.LineSegments() = old_segments;
|
||||||
|
}
|
||||||
|
|
||||||
mesh.CalcSurfacesOfNode();
|
mesh.CalcSurfacesOfNode();
|
||||||
mesh.GetTopology().ClearEdges();
|
mesh.GetTopology().ClearEdges();
|
||||||
mesh.SetNextMajorTimeStamp();
|
mesh.SetNextMajorTimeStamp();
|
||||||
|
@ -69,7 +69,7 @@ public:
|
|||||||
Array<size_t> par_project_boundaries;
|
Array<size_t> par_project_boundaries;
|
||||||
|
|
||||||
bool have_single_segments;
|
bool have_single_segments;
|
||||||
Array<Segment> segments, new_segments, new_segments_on_moved_bnd;
|
Array<Segment> old_segments, segments, new_segments, new_segments_on_moved_bnd;
|
||||||
Array<Element2d, SurfaceElementIndex> new_sels, new_sels_on_moved_bnd;
|
Array<Element2d, SurfaceElementIndex> new_sels, new_sels_on_moved_bnd;
|
||||||
Array<Array<PointIndex>, PointIndex> mapto;
|
Array<Array<PointIndex>, PointIndex> mapto;
|
||||||
Array<PointIndex, PointIndex> mapfrom;
|
Array<PointIndex, PointIndex> mapfrom;
|
||||||
|
Loading…
Reference in New Issue
Block a user