fix 2d edge swapping

This commit is contained in:
mhochsteger@cerbsim.com 2022-02-23 21:11:05 +01:00
parent fe838fbd75
commit 922a0c5c86
2 changed files with 9 additions and 2 deletions

View File

@ -35,6 +35,7 @@ namespace netgen
if (t2 == -1) return false;
if (swapped[t1] || swapped[t2]) return false;
if (mesh[t2].IsDeleted()) return false;
const int faceindex = mesh[t1].GetIndex();
const int surfnr = mesh.GetFaceDescriptor (faceindex).SurfNr();
@ -278,6 +279,7 @@ namespace netgen
}
const auto sel = mesh[sei];
auto index = sel.GetIndex();
for (int j = 0; j < 3; j++)
{
PointIndex pi1 = sel.PNumMod(j+2);
@ -286,6 +288,7 @@ namespace netgen
for (auto sei_other : elements_on_node[pi1])
{
if(sei_other==sei) continue;
if(mesh[sei_other].GetIndex()!=index) continue;
const auto & other = mesh[sei_other];
int pi1_other = -1;
int pi2_other = -1;
@ -333,7 +336,7 @@ namespace netgen
if (mesh[t1].IsDeleted())
return;
if (mesh[t1].GetIndex() != faceindex)
if (swapped[t1])
return;
if (multithread.terminate)

View File

@ -6063,7 +6063,11 @@ namespace netgen
{
GetSurfaceElementsOfFace (fdi, els_of_face);
if (els_of_face.Size() == 0) continue;
if (els_of_face.Size() == 0)
{
fdi++;
continue;
}
SurfaceElementIndex firstel = els_of_face[0];