remove another reference of resized array

This commit is contained in:
Christopher Lackner 2020-11-19 22:53:14 +01:00
parent 3440a43e99
commit e7b9baa93b

View File

@ -410,7 +410,8 @@ namespace netgen
for(SurfaceElementIndex si = 0; si < nse; si++) for(SurfaceElementIndex si = 0; si < nse; si++)
{ {
auto& sel = mesh[si]; // copy because surfaceels array will be resized!
auto sel = mesh[si];
if(si_map[sel.GetIndex()] != -1) if(si_map[sel.GetIndex()] != -1)
{ {
Array<PointIndex> points(sel.PNums()); Array<PointIndex> points(sel.PNums());
@ -436,7 +437,7 @@ namespace netgen
mesh.AddSurfaceElement(newel); mesh.AddSurfaceElement(newel);
} }
if(move_boundaries.Test(sel.GetIndex())) if(move_boundaries.Test(sel.GetIndex()))
for(auto& p : sel.PNums()) for(auto& p : mesh[si].PNums())
if(mapto[p].Size()) if(mapto[p].Size())
p = mapto[p].Last(); p = mapto[p].Last();
} }