mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-14 10:08:32 +05:00
Merge branch 'fix_pointsels_in_2dgeom' into 'master'
Only add segment end points of 2d geometry to mesh as 0D-elements See merge request jschoeberl/netgen!373
This commit is contained in:
commit
7b62f39460
@ -271,6 +271,7 @@ namespace netgen
|
|||||||
|
|
||||||
// add point elements
|
// add point elements
|
||||||
for (auto & point : geompoints)
|
for (auto & point : geompoints)
|
||||||
|
if (point.name.length())
|
||||||
{
|
{
|
||||||
Point<3> newp(point(0), point(1), 0);
|
Point<3> newp(point(0), point(1), 0);
|
||||||
PointIndex npi = mesh2d.AddPoint (newp, 1, FIXEDPOINT);
|
PointIndex npi = mesh2d.AddPoint (newp, 1, FIXEDPOINT);
|
||||||
@ -301,6 +302,11 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
npi = mesh2d.AddPoint (newp, layer);
|
npi = mesh2d.AddPoint (newp, layer);
|
||||||
searchtree.Insert (newp, npi);
|
searchtree.Insert (newp, npi);
|
||||||
|
mesh2d.AddLockedPoint(npi);
|
||||||
|
Element0d el(npi, npi);
|
||||||
|
el.name = "";
|
||||||
|
mesh2d.SetCD2Name(npi, "");
|
||||||
|
mesh2d.pointelements.Append (el);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user