mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
fix point type of geo vertices (FIXEDPOINT) -> locked points
This commit is contained in:
parent
aeb6a17255
commit
016b1692e2
@ -529,6 +529,8 @@ namespace netgen
|
|||||||
tree.Insert(mesh[pi], pi);
|
tree.Insert(mesh[pi], pi);
|
||||||
vert2meshpt[vert->GetHash()] = pi;
|
vert2meshpt[vert->GetHash()] = pi;
|
||||||
mesh[pi].Singularity(vert->properties.hpref);
|
mesh[pi].Singularity(vert->properties.hpref);
|
||||||
|
mesh[pi].SetType(FIXEDPOINT);
|
||||||
|
mesh.AddLockedPoint(pi);
|
||||||
|
|
||||||
if(vert->properties.name)
|
if(vert->properties.name)
|
||||||
{
|
{
|
||||||
|
@ -276,7 +276,11 @@ namespace netgen
|
|||||||
bool have_single_segments = HaveSingleSegments(mesh);
|
bool have_single_segments = HaveSingleSegments(mesh);
|
||||||
Array<Segment> segments;
|
Array<Segment> segments;
|
||||||
if(have_single_segments)
|
if(have_single_segments)
|
||||||
|
{
|
||||||
segments = BuildSegments(mesh);
|
segments = BuildSegments(mesh);
|
||||||
|
mesh.SetNextMajorTimeStamp();
|
||||||
|
mesh.UpdateTopology();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
segments = mesh.LineSegments();
|
segments = mesh.LineSegments();
|
||||||
|
|
||||||
@ -492,25 +496,29 @@ namespace netgen
|
|||||||
if(seg.edgenr-1 == edgenr && mesh[seg[0]].Type() == FIXEDPOINT)
|
if(seg.edgenr-1 == edgenr && mesh[seg[0]].Type() == FIXEDPOINT)
|
||||||
{
|
{
|
||||||
points.Append(seg[0]);
|
points.Append(seg[0]);
|
||||||
|
points.Append(seg[1]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
while(true)
|
while(true)
|
||||||
{
|
{
|
||||||
|
bool point_found = false;
|
||||||
for(auto si : meshtopo.GetVertexSegments(points.Last()))
|
for(auto si : meshtopo.GetVertexSegments(points.Last()))
|
||||||
{
|
{
|
||||||
const auto& seg = mesh[si];
|
const auto& seg = mesh[si];
|
||||||
if(seg.edgenr-1 != edgenr)
|
if(seg.edgenr-1 != edgenr)
|
||||||
continue;
|
continue;
|
||||||
if(seg[0] == points.Last() &&
|
if(seg[0] == points.Last() && points[points.Size()-2] !=seg[1])
|
||||||
(points.Size() < 2 || points[points.Size()-2] !=seg[1]))
|
|
||||||
{
|
{
|
||||||
points.Append(seg[1]);
|
points.Append(seg[1]);
|
||||||
|
point_found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(mesh[points.Last()].Type() == FIXEDPOINT)
|
if(mesh[points.Last()].Type() == FIXEDPOINT)
|
||||||
break;
|
break;
|
||||||
|
if(!point_found)
|
||||||
|
throw Exception(string("Could not find connected list of line segements for edge ") + edgenr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// tangential part of growth vectors
|
// tangential part of growth vectors
|
||||||
|
Loading…
Reference in New Issue
Block a user