mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
[bugfix] Set element index in CloseSurface()
This commit is contained in:
parent
f1dc069052
commit
b0129d0473
@ -1274,6 +1274,7 @@ BuildSurfaceElements (Array<Segment> & segs,
|
||||
if (nst1 * dvec < 0) continue;
|
||||
|
||||
Element2d el(s1[0], s1[1], s2[0], s2[1]);
|
||||
el.SetIndex(s1.si);
|
||||
|
||||
Vec<3> n = Cross (mesh[el[1]] - mesh[el[0]],
|
||||
mesh[el[3]] - mesh[el[0]]);
|
||||
|
@ -314,7 +314,7 @@ namespace netgen
|
||||
SurfaceElementIndex si = surfelements.Size();
|
||||
surfelements.Append (el);
|
||||
|
||||
if (el.index > facedecoding.Size())
|
||||
if (el.index<=0 || el.index > facedecoding.Size())
|
||||
cerr << "has no facedecoding: fd.size = " << facedecoding.Size() << ", ind = " << el.index << endl;
|
||||
|
||||
surfelements.Last().next = facedecoding[el.index-1].firstelement;
|
||||
|
Loading…
Reference in New Issue
Block a user