geo vertices as pointelements not locked points

This commit is contained in:
Christopher Lackner 2022-03-02 11:34:02 +01:00
parent 36440970fb
commit 9730a383fd
3 changed files with 11 additions and 10 deletions

View File

@ -530,16 +530,12 @@ namespace netgen
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[pi].SetType(FIXEDPOINT);
mesh.AddLockedPoint(pi);
if(vert->properties.name)
{
Element0d el(pi, pi); Element0d el(pi, pi);
el.name = vert->properties.GetName(); el.name = vert->properties.GetName();
mesh.SetCD3Name(pi, el.name); mesh.SetCD3Name(pi, el.name);
mesh.pointelements.Append (el); mesh.pointelements.Append (el);
} }
}
for(auto & vert : vertices) for(auto & vert : vertices)
for(auto & ident : vert->identifications) for(auto & ident : vert->identifications)

View File

@ -2352,6 +2352,8 @@ namespace netgen
for (int i = 0; i < lockedpoints.Size(); i++) for (int i = 0; i < lockedpoints.Size(); i++)
points[lockedpoints[i]].SetType(FIXEDPOINT); points[lockedpoints[i]].SetType(FIXEDPOINT);
for(const auto& pointel : pointelements)
points[pointel.pnum].SetType(FIXEDPOINT);
/* /*
for (i = 0; i < openelements.Size(); i++) for (i = 0; i < openelements.Size(); i++)

View File

@ -102,7 +102,7 @@ namespace netgen
// mark locked/fixed points for each domain TODO: domain bounding box to add only relevant points? // mark locked/fixed points for each domain TODO: domain bounding box to add only relevant points?
for(auto pi : mesh.LockedPoints()) for(auto pi : mesh.LockedPoints())
for(auto i : Range(ret)) for(auto i : Range(ret))
ipmap[i][pi] = 1; ipmap[i][pi] = 2;
// add used points to domain mesh, build point mapping // add used points to domain mesh, build point mapping
for(auto i : Range(ret)) for(auto i : Range(ret))
@ -113,7 +113,10 @@ namespace netgen
for(auto pi : Range(ipmap[i])) for(auto pi : Range(ipmap[i]))
if(ipmap[i][pi]) if(ipmap[i][pi])
{ {
auto pi_new = m.AddPoint( mesh[pi] ); const auto& mp = mesh[pi];
auto pi_new = m.AddPoint( mp, mp.GetLayer(), mp.Type() );
if(ipmap[i][pi] == 2)
mesh.AddLockedPoint(pi_new);
ipmap[i][pi] = pi_new; ipmap[i][pi] = pi_new;
pmap.Append( pi ); pmap.Append( pi );
} }