Skip to content

Commit 4a2ad3f

Browse files
committed
Ensured that surface element pointers to elements are correctly re-initialized during hex-refine2d remeshing.
1 parent ecdb310 commit 4a2ad3f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

FEAMR/FEHexRefine2D.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,6 +726,14 @@ bool FEHexRefine2D::UpdateSurface(FESurface& surf)
726726
FEMeshTopo& topo = *m_topo;
727727
int NF0 = surf.Elements();
728728

729+
// set all element pointers to zero
730+
for (int i = 0; i < NF0; ++i)
731+
{
732+
FESurfaceElement& el = surf.Element(i);
733+
el.m_elem[0].Reset();
734+
el.m_elem[1].Reset();
735+
}
736+
729737
// figure out which facets to split
730738
vector<int> faceList = topo.FaceIndexList(surf);
731739
assert((int)faceList.size() == NF0);

0 commit comments

Comments
 (0)