hp-refinement for singular tet-faces

This commit is contained in:
Joachim Schoeberl 2023-09-20 19:08:44 +02:00
parent 9593615da7
commit b6071dd1e4
5 changed files with 610 additions and 41 deletions

View File

@ -5,7 +5,7 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
int ep1(0), ep2(0), ep3(0), ep4(0), cp1(0), cp2(0), cp3(0), cp4(0), fp1, fp2, fp3, fp4; int ep1(0), ep2(0), ep3(0), ep4(0), cp1(0), cp2(0), cp3(0), cp4(0), fp1, fp2, fp3, fp4;
int isedge1(0), isedge2(0), isedge3(0), isedge4(0), isedge5(0), isedge6(0); int isedge1(0), isedge2(0), isedge3(0), isedge4(0), isedge5(0), isedge6(0);
int isfedge1, isfedge2, isfedge3, isfedge4, isfedge5, isfedge6; int isfedge1, isfedge2, isfedge3, isfedge4, isfedge5, isfedge6;
int isface1(0), isface2(0), isface3(0), isface4(0); bool isface[4];
HPREF_ELEMENT_TYPE type = HP_NONE; HPREF_ELEMENT_TYPE type = HP_NONE;
@ -21,7 +21,6 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
if (debug < 4) debug = 0; if (debug < 4) debug = 0;
for (int j = 0; j < 4; j++) for (int j = 0; j < 4; j++)
for (int k = 0; k < 4; k++) for (int k = 0; k < 4; k++)
{ {
@ -72,31 +71,23 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
} }
isface1 = isface2 = isface3 = isface4 = 0; for (int j = 0; j < 4; j++) isface[j] = false;
for (int l = 0; l < 4; l++) for (int l = 0; l < 4; l++)
{ {
INDEX_3 i3(0,0,0); INDEX_3 i3(0,0,0);
switch (l) switch (l)
{ {
case 0: i3.I1() = el.pnums[k]; i3.I1() = el.pnums[pi3]; i3.I1() = el.pnums[pi4]; break; case 0: i3.I1() = el.pnums[k]; i3.I2() = el.pnums[pi3]; i3.I3() = el.pnums[pi4]; break;
case 1: i3.I1() = el.pnums[j]; i3.I1() = el.pnums[pi3]; i3.I1() = el.pnums[pi4]; break; case 1: i3.I1() = el.pnums[j]; i3.I2() = el.pnums[pi3]; i3.I3() = el.pnums[pi4]; break;
case 2: i3.I1() = el.pnums[j]; i3.I1() = el.pnums[k]; i3.I1() = el.pnums[pi4]; break; case 2: i3.I1() = el.pnums[j]; i3.I2() = el.pnums[k]; i3.I3() = el.pnums[pi4]; break;
case 3: i3.I1() = el.pnums[j]; i3.I1() = el.pnums[k]; i3.I1() = el.pnums[pi3]; break; case 3: i3.I1() = el.pnums[j]; i3.I2() = el.pnums[k]; i3.I3() = el.pnums[pi3]; break;
} }
i3.Sort(); i3.Sort();
if (faces.Used (i3)) if (faces.Used (i3))
{ {
int domnr = faces.Get(i3); int domnr = faces.Get(i3);
if (domnr == -1 || domnr == el.GetIndex()) if (domnr == -1 || domnr == el.GetIndex())
{ isface[l] = true;
switch (l)
{
case 0: isface1 = 1; break;
case 1: isface2 = 1; break;
case 2: isface3 = 1; break;
case 3: isface4 = 1; break;
}
}
} }
} }
/* /*
@ -169,16 +160,55 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
} }
} }
} }
/*
ep1 |= cp1;
ep2 |= cp2;
ep3 |= cp3;
ep4 |= cp4;
fp1 |= ep1;
fp2 |= ep2;
fp3 |= ep3;
fp4 |= ep4;
*/
/* /*
fp1 = facepoint[el.pnums[j]] != 0; fp1 = facepoint[el.pnums[j]] != 0;
fp2 = facepoint[el.pnums[k]] != 0; fp2 = facepoint[el.pnums[k]] != 0;
fp3 = facepoint[el.pnums[pi3]] != 0; fp3 = facepoint[el.pnums[pi3]] != 0;
fp4 = facepoint[el.pnums[pi4]] != 0; fp4 = facepoint[el.pnums[pi4]] != 0;
*/ */
// cout << "marked faces: "
switch (isface1+isface2+isface3+isface4) // << isface[0] << isface[1] << isface[2] << isface[3]
// << ", num = " << isface[0]+isface[1]+isface[2]+isface[3] << endl;
bool sp1 = cp1
|| (ep1 && !isedge1 && !isedge2 && !isedge3)
|| (fp1 && !isfedge1 && !isfedge2 && !isfedge3);
bool sp2 = cp2
|| (ep2 && !isedge1 && !isedge4 && !isedge5)
|| (fp2 && !isfedge1 && !isfedge4 && !isfedge5);
bool sp3 = cp3
|| (ep3 && !isedge2 && !isedge4 && !isedge6)
|| (fp3 && !isfedge2 && !isfedge4 && !isfedge6);
bool sp4 = cp4
|| (ep4 && !isedge3 && !isedge5 && !isedge6)
|| (fp4 && !isfedge3 && !isfedge5 && !isfedge6);
bool se1 = isedge1 || (isfedge1 && !isface[2] && !isface[3]);
bool se2 = isedge2 || (isfedge2 && !isface[1] && !isface[3]);
bool se3 = isedge3 || (isfedge3 && !isface[1] && !isface[2]);
bool se4 = isedge4 || (isfedge4 && !isface[0] && !isface[3]);
bool se5 = isedge5 || (isfedge5 && !isface[0] && !isface[2]);
bool se6 = isedge6 || (isfedge6 && !isface[0] && !isface[1]);
switch (isface[0]+isface[1]+isface[2]+isface[3])
{ {
case 0: case 0:
{ {
@ -327,6 +357,12 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
if (cp3 && cp4) if (cp3 && cp4)
type = HP_TET_3EC_2V; type = HP_TET_3EC_2V;
} }
if (isedge1 && isedge2 && isedge4)
{
if (!cp4)
type = HP_TET_3ED_3V; // a loop
}
break; break;
} }
} }
@ -337,9 +373,22 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
case 1: // one singular face case 1: // one singular face
{ {
if (!isface1) break; if (!isface[0]) break;
switch (isfedge1+isfedge2+isfedge3+isedge4+isedge5+isedge6) /*
cout << "1F and 1E, isedge = " << isedge1 << isedge2 << isedge3 << isedge4 << isedge5 << isedge6 << endl;
cout << "spoints = " << sp1 << sp2 << sp3 << sp4 << endl;
cout << "cpoints = " << cp1 << cp2 << cp3 << cp4 << endl;
cout << "epoints = " << ep1 << ep2 << ep3 << ep4 << endl;
cout << "fpoints = " << fp1 << fp2 << fp3 << fp4 << endl;
*/
isedge1 |= isfedge1;
isedge2 |= isfedge2;
isedge3 |= isfedge3;
// switch (isedge1+isedge2+isedge3+isedge4+isedge5+isedge6)
switch (se1+se2+se3+se4+se5+se6)
{ {
case 0: case 0:
{ {
@ -349,22 +398,42 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
type = HP_TET_1F_0E_1VB; type = HP_TET_1F_0E_1VB;
if (!fp1 && ep2 && !ep3 & !ep4) if (!fp1 && ep2 && !ep3 & !ep4)
type = HP_TET_1F_0E_1VA; type = HP_TET_1F_0E_1VA;
if (!fp1 && ep2 && ep3 & !ep4)
type = HP_TET_1F_0E_2V;
break; break;
} }
case 1: case 1:
{ {
if (isfedge1) if (se1)
{ {
if (!ep1 && !ep3 && !ep4) if (!sp1 && !sp3 && !sp4)
type = HP_TET_1F_1EA_0V; type = HP_TET_1F_1EA_0V;
if (!sp1 && sp2 && sp3 && !sp4)
type = HP_TET_1F_1E_2VA;
if (!sp1 && sp2 && !sp3 && sp4)
type = HP_TET_1F_1E_2VB;
if (!sp1 && !sp2 && sp3 && sp4)
type = HP_TET_1F_1E_2VC;
} }
if (isedge4) // V1-V3 if (se4) // V2-V3
{ {
if (!ep1 && !cp2 && !cp3 && !ep4) if (!sp1 && !sp2 && !sp3 && !sp4)
type = HP_TET_1F_1EB_0V; type = HP_TET_1F_1EB_0V;
} }
break; break;
} }
case 2:
{
if (isedge6 && isedge3)
if (!cp1 && !cp2 && !cp3)
type = HP_TET_1F_2E_0VA;
if (isedge6 && isedge2)
if (!cp1 && !cp2 && !cp4)
type = HP_TET_1F_2E_0VB;
break;
}
default:
;
} }
break; break;
} }
@ -372,21 +441,57 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
case 2: // two singular faces case 2: // two singular faces
{ {
if (!isface1 || !isface2) break; if (!isface[0] || !isface[1]) break;
switch (isfedge1+isedge2+isedge3+isedge4+isedge5) switch (isfedge1+isedge2+isedge3+isedge4+isedge5)
{ {
case 0: case 0:
{ {
if (!ep1 && !ep2 && !cp3 && !cp4) if (!ep1 && !ep2 && !cp3 && !cp4)
type = HP_TET_2F_0E_0V; {
break; type = HP_TET_2F_0E_0V;
break;
}
if (!ep1 && !ep2 && !cp3 && cp4)
{
type = HP_TET_2F_0E_1V;
break;
}
} }
case 1:
{
if (isedge4 && !ep1 && !cp2 && !cp4)
{
type = HP_TET_2F_1E_0VA;
break;
}
if (isedge5 && !ep1 && !cp2 && !cp3)
{
type = HP_TET_2F_1E_0VB;
break;
}
}
default:
;
} }
break; break;
} }
case 3:
{
if (!isface[3])
if (!cp1 && !cp2 && !cp3)
{
type = HP_TET_3F_0E_0V;
break;
}
break;
}
case 4:
{
*testout << "4 singular faces" << endl;
}
} }
if (type != HP_NONE) if (type != HP_NONE)
@ -407,13 +512,20 @@ HPREF_ELEMENT_TYPE ClassifyTet(HPRefElement & el, INDEX_2_HASHTABLE<int> & edges
if (type == HP_NONE) if (type == HP_NONE)
{ {
// cnt_undef++; // cnt_undef++;
(*testout) << "undefined element" << endl (*testout) << "unclassified element "
<< el.pnums[0] << " "
<< el.pnums[1] << " "
<< el.pnums[2] << " "
<< el.pnums[3] << endl
<< "cp = " << cp1 << cp2 << cp3 << cp4 << endl << "cp = " << cp1 << cp2 << cp3 << cp4 << endl
<< "ep = " << ep1 << ep2 << ep3 << ep4 << endl << "ep = " << ep1 << ep2 << ep3 << ep4 << endl
<< "fp = " << fp1 << fp2 << fp3 << fp4 << endl
<< "isedge = " << isedge1 << isedge2 << isedge3 << "isedge = " << isedge1 << isedge2 << isedge3
<< isedge4 << isedge5 << isedge6 << endl << isedge4 << isedge5 << isedge6 << endl
<< "isface = " << isface1 << isface2 << isface3 << isface4 << endl; << "isfedge = " << isfedge1 << isfedge2 << isfedge3
cout << "undefined element !!! " << endl; << isfedge4 << isfedge5 << isfedge6 << endl
<< "isface = " << isface[0] << isface[1] << isface[2] << isface[3] << endl;
cout << "unclassified element !!! " << endl;
} }

View File

@ -1,5 +1,31 @@
// HP_NONETET
int refnonetet_splitedges[][3] =
{
{ 0, 0, 0 }
};
HPREF_ELEMENT_TYPE refnonetet_newelstypes[] =
{
HP_TET,
HP_NONE,
};
int refnonetet_newels[][8] =
{
{ 1, 1, 1, 1 },
};
HPRef_Struct refnonetet =
{
HP_TET,
refnonetet_splitedges,
0, 0,
refnonetet_newelstypes,
refnonetet_newels
};
// HP_TET // HP_TET
int reftet_splitedges[][3] = int reftet_splitedges[][3] =
@ -2858,6 +2884,77 @@ HPRef_Struct reftet_3ec_2v =
// HP_TET_3ED_3V,
int reftet_3ed_3v_splitedges[][3] =
{
{ 1, 2, 5 },
{ 1, 3, 6 },
{ 1, 4, 7 },
{ 2, 1, 8 },
{ 2, 3, 9 },
{ 2, 4, 10 },
{ 3, 1, 11 },
{ 3, 2, 12 },
{ 3, 4, 13 },
{ 0, 0, 0 }
};
int reftet_3ed_3v_splitfaces[][4] =
{
{ 1, 2, 3, 14 },
{ 2, 3, 1, 15 },
{ 3, 1, 2, 16 },
{ 0, 0, 0, 0 }
};
int reftet_3ed_3v_splitelements[][5] =
{
{ 0 },
};
HPREF_ELEMENT_TYPE reftet_3ed_3v_newelstypes[] =
{
HP_TET,
HP_PRISM,
HP_PRISM_SINGEDGE,
HP_PRISM_SINGEDGE,
HP_PRISM_SINGEDGE,
HP_TET_1E_1VA,
HP_TET_1E_1VA,
HP_TET_1E_1VA,
HP_TET_1E_1VA,
HP_TET_1E_1VA,
HP_TET_1E_1VA,
HP_NONE,
};
int reftet_3ed_3v_newels[][8] =
{
{ 7, 10, 13, 4 },
{ 14, 15, 16, 7, 10, 13 },
{ 5, 14, 7, 8, 15, 10 },
{ 9, 15, 10, 12, 16, 13 },
{ 11, 16, 13, 6, 14, 7 },
{ 1, 5, 14, 7 },
{ 1, 6, 7, 14 },
{ 2, 8, 10, 15 },
{ 2, 9, 15, 10 },
{ 3, 12, 13, 16 },
{ 3, 11, 16, 13 }
};
HPRef_Struct reftet_3ed_3v =
{
HP_TET,
reftet_3ed_3v_splitedges,
reftet_3ed_3v_splitfaces,
reftet_3ed_3v_splitelements,
reftet_3ed_3v_newelstypes,
reftet_3ed_3v_newels
};
@ -2973,6 +3070,51 @@ HPRef_Struct reftet_1f_0e_1vb =
// HP_TET_1F_0E_2V ... face 234, sing verts v2,v3
int reftet_1f_0e_2v_splitedges[][3] =
{
{ 2, 1, 5 },
{ 2, 3, 6 },
{ 2, 4, 7 },
{ 3, 1, 8 },
{ 3, 2, 9 },
{ 3, 4, 10 },
{ 4, 1, 11 },
{ 0, 0, 0 }
};
HPREF_ELEMENT_TYPE reftet_1f_0e_2v_newelstypes[] =
{
HP_TET_0E_1V,
HP_PRISM_1FA_0E_0V,
HP_PRISM_1FB_0E_0V,
HP_TET_1F_0E_1VA,
HP_TET_1F_0E_1VA,
HP_NONE,
};
int reftet_1f_0e_2v_newels[][8] =
{
{ 1, 5, 8, 11 },
{ 4, 10, 7, 11, 8, 5 },
{ 9, 10, 8, 6, 7, 5 },
{ 5, 2, 6, 7 },
{ 8, 3, 10, 9 }
};
HPRef_Struct reftet_1f_0e_2v =
{
HP_TET,
reftet_1f_0e_2v_splitedges,
0, 0,
reftet_1f_0e_2v_newelstypes,
reftet_1f_0e_2v_newels
};
// HP_TET_1F_1EA_0V ... sing edge is 1..2 // HP_TET_1F_1EA_0V ... sing edge is 1..2
int reftet_1f_1ea_0v_splitedges[][3] = int reftet_1f_1ea_0v_splitedges[][3] =
@ -3073,6 +3215,107 @@ HPRef_Struct reftet_1f_1eb_0v =
// HP_TET_1F_1E_2VA // 1 sing edge not in face (e12), sing v2,v3
int reftet_1f_1e_2va_splitedges[][3] =
{
{ 1, 3, 5 },
{ 1, 4, 6 },
{ 2, 1, 7 },
{ 2, 3, 8 },
{ 2, 4, 9 },
{ 3, 1, 10 },
{ 3, 2, 11 },
{ 3, 4, 12 },
{ 4, 1, 13 },
{ 0, 0, 0 }
};
int reftet_1f_1e_2va_splitfaces[][4] =
{
{ 2, 1, 3, 14 },
{ 2, 1, 4, 15 },
{ 0, 0, 0, 0 }
};
HPREF_ELEMENT_TYPE reftet_1f_1e_2va_newelstypes[] =
{
HP_PRISM,
HP_PRISM_SINGEDGE,
HP_PRISM_1FB_0E_0V,
HP_TET_1F_0E_1VA,
HP_TET_1F_0E_1VA,
HP_TET_1E_1VA,
HP_TET_1E_1VA,
HP_NONE,
};
int reftet_1f_1e_2va_newels[][8] =
{
{ 5, 14, 10, 6, 15, 13 },
{ 1, 5, 6, 7, 14, 15 },
{ 8, 14, 9, 11, 10, 12 },
{ 10, 3, 12, 11 },
{ 14, 2, 8, 9 },
{ 2, 7, 15, 14 },
{ 2, 9, 14, 15 }
};
HPRef_Struct reftet_1f_1e_2va =
{
HP_TET,
reftet_1f_1e_2va_splitedges,
reftet_1f_1e_2va_splitfaces,
0,
reftet_1f_1e_2va_newelstypes,
reftet_1f_1e_2va_newels
};
// HP_TET_1F_2E_0V singular edge in face 234 is 34, and edge not in face is 14
int reftet_1f_2e_0va_splitedges[][3] =
{
{ 2, 1, 5 },
{ 2, 4, 6 },
{ 3, 1, 7 },
{ 3, 4, 8 },
{ 4, 1, 9 },
{ 0, 0, 0 }
};
HPREF_ELEMENT_TYPE reftet_1f_2e_0va_newelstypes[] =
{
HP_PRISM_1FB_1EA_0V,
HP_PRISM_1FA_0E_0V,
HP_TET,
HP_NONE,
};
int reftet_1f_2e_0va_newels[][8] =
{
// { 2, 5, 6, 3, 7, 8 },
{ 3, 8, 7, 2, 6, 5 },
{ 6, 4, 8, 5, 9, 7 },
{ 5, 9, 7, 1}
};
HPRef_Struct reftet_1f_2e_0va =
{
HP_TET,
reftet_1f_2e_0va_splitedges,
0, 0,
reftet_1f_2e_0va_newelstypes,
reftet_1f_2e_0va_newels
};
/* ************************ 2 singular faces ******************** */ /* ************************ 2 singular faces ******************** */
@ -3126,3 +3369,161 @@ HPRef_Struct reftet_2f_0e_0v =
reftet_2f_0e_0v_newels reftet_2f_0e_0v_newels
}; };
// HP_TET_2F_1E_0VA = 601, // 2 singular faces, sing edge e4
int reftet_2f_1e_0va_splitedges[][3] =
{
{ 1, 2, 5 },
{ 2, 1, 6 },
{ 3, 1, 7 },
{ 3, 2, 8 },
{ 4, 1, 9 },
{ 4, 2, 10 },
{ 0, 0, 0 }
};
int reftet_2f_1e_0va_splitfaces[][4] =
{
{ 3, 1, 2, 11 },
{ 4, 1, 2, 12 },
{ 0, 0, 0, 0 }
};
HPREF_ELEMENT_TYPE reftet_2f_1e_0va_newelstypes[] =
{
HP_PRISM_1FA_0E_0V,
HP_PRISM_1FA_0E_0V,
HP_PRISM_1FB_1EA_0V,
HP_PRISM_1FB_1EA_0V,
HP_TET,
HP_NONE,
};
int reftet_2f_1e_0va_newels[][8] =
{
{ 2, 10, 8, 6, 12, 11 },
{ 1, 7, 9, 5, 11, 12 },
// { 3, 11, 8, 4, 12, 10 },
{ 4, 10, 12, 3, 8, 11 },
{ 3, 7, 11, 4, 9, 12 },
{ 5, 6, 11, 12 }
};
HPRef_Struct reftet_2f_1e_0va =
{
HP_TET,
reftet_2f_1e_0va_splitedges,
reftet_2f_1e_0va_splitfaces,
0,
reftet_2f_1e_0va_newelstypes,
reftet_2f_1e_0va_newels
};
// HP_TET_2F_1E_0VB = 602, // 2 singular faces f234,f134, sing edge e5=e23
int reftet_2f_1e_0vb_splitedges[][3] =
{
{ 1, 2, 5 },
{ 2, 1, 6 },
{ 2, 3, 7 },
{ 3, 1, 8 },
{ 3, 2, 9 },
{ 4, 1, 10 },
{ 4, 2, 11 },
{ 4, 3, 12 },
{ 0, 0, 0 }
};
int reftet_2f_1e_0vb_splitfaces[][4] =
{
{ 4, 2, 3, 13 },
{ 4, 1, 2, 14 },
{ 3, 1, 2, 15 },
{ 0, 0, 0, 0 }
};
HPREF_ELEMENT_TYPE reftet_2f_1e_0vb_newelstypes[] =
{
HP_TET,
/*
HP_PRISM_1FA_0E_0V,
HP_PRISM_1FA_0E_0V,
HP_PRISM_1FB_1EA_0V,
HP_PRISM_1FB_1EA_0V,
*/
HP_NONE,
};
int reftet_2f_1e_0vb_newels[][8] =
{
{ 5, 6, 15, 14 },
};
HPRef_Struct reftet_2f_1e_0vb =
{
HP_TET,
reftet_2f_1e_0vb_splitedges,
reftet_2f_1e_0vb_splitfaces,
0,
reftet_2f_1e_0vb_newelstypes,
reftet_2f_1e_0vb_newels
};
// HP_TET_3F_0E_0V = 610, // 3 singular faces, no additional points or edges
int reftet_3f_0e_0v_splitedges[][3] =
{
{ 1, 2, 5 },
{ 2, 1, 6 },
{ 3, 1, 7 },
{ 3, 2, 8 },
{ 4, 1, 9 },
{ 4, 2, 10 },
{ 0, 0, 0 }
};
int reftet_3f_0e_0v_splitfaces[][4] =
{
{ 3, 1, 2, 11 },
{ 4, 1, 2, 12 },
{ 0, 0, 0, 0 }
};
HPREF_ELEMENT_TYPE reftet_3f_0e_0v_newelstypes[] =
{
HP_PRISM_1FA_0E_0V,
HP_PRISM_1FA_0E_0V,
HP_PRISM_1FB_1EA_0V,
HP_PRISM_1FB_1EA_0V,
HP_TET,
HP_NONE,
};
int reftet_3f_0e_0v_newels[][8] =
{
{ 2, 10, 8, 6, 12, 11 },
{ 1, 7, 9, 5, 11, 12 },
// { 3, 11, 8, 4, 12, 10 },
{ 4, 10, 12, 3, 8, 11 },
{ 3, 7, 11, 4, 9, 12 },
{ 5, 6, 11, 12 }
};
HPRef_Struct reftet_3f_0e_0v =
{
HP_TET,
reftet_3f_0e_0v_splitedges,
reftet_3f_0e_0v_splitfaces,
0,
reftet_3f_0e_0v_newelstypes,
reftet_3f_0e_0v_newels
};
/*
*/

View File

@ -124,7 +124,12 @@ namespace netgen
HPRef_Struct * Get_HPRef_Struct (HPREF_ELEMENT_TYPE type) HPRef_Struct * Get_HPRef_Struct (HPREF_ELEMENT_TYPE type)
{ {
HPRef_Struct * hps = NULL; HPRef_Struct * hps = NULL;
/*
if (type >= 100 && type < 1000)
if (type != HP_TET_2F_1E_0VB)
type = HP_NONETET;
*/
switch (type) switch (type)
{ {
case HP_SEGM: case HP_SEGM:
@ -289,6 +294,8 @@ namespace netgen
case HP_TET: case HP_TET:
hps = &reftet; break; hps = &reftet; break;
case HP_NONETET:
hps = &refnonetet; break;
case HP_TET_0E_1V: case HP_TET_0E_1V:
hps = &reftet_0e_1v; break; hps = &reftet_0e_1v; break;
case HP_TET_0E_2V: case HP_TET_0E_2V:
@ -375,6 +382,8 @@ namespace netgen
hps = &reftet_3ec_1v; break; hps = &reftet_3ec_1v; break;
case HP_TET_3EC_2V: case HP_TET_3EC_2V:
hps = &reftet_3ec_2v; break; hps = &reftet_3ec_2v; break;
case HP_TET_3ED_3V:
hps = &reftet_3ed_3v; break;
case HP_TET_1F_0E_0V: case HP_TET_1F_0E_0V:
@ -383,13 +392,43 @@ namespace netgen
hps = &reftet_1f_0e_1va; break; hps = &reftet_1f_0e_1va; break;
case HP_TET_1F_0E_1VB: case HP_TET_1F_0E_1VB:
hps = &reftet_1f_0e_1vb; break; hps = &reftet_1f_0e_1vb; break;
case HP_TET_1F_0E_2V:
hps = &reftet_1f_0e_2v; break;
case HP_TET_1F_1EA_0V: case HP_TET_1F_1EA_0V:
hps = &reftet_1f_1ea_0v; break; hps = &reftet_1f_1ea_0v; break;
case HP_TET_1F_1EB_0V: case HP_TET_1F_1EB_0V:
hps = &reftet_1f_1eb_0v; break; hps = &reftet_1f_1eb_0v; break;
case HP_TET_1F_1E_2VA:
hps = &reftet_1f_1e_2va; break;
case HP_TET_1F_2E_0VA:
{
*testout << "hp_tet_1f_2e_0v needs testing" << endl;
cout << "hp_tet_1f_2e_0v needs testing" << endl;
hps = &reftet_1f_2e_0va; break;
}
case HP_TET_2F_0E_0V: case HP_TET_2F_0E_0V:
hps = &reftet_2f_0e_0v; break; hps = &reftet_2f_0e_0v; break;
case HP_TET_2F_1E_0VA:
{
*testout << "hp_tet_2f_1e_0va needs testing" << endl;
cout << "hp_tet_2f_1e_0va needs testing" << endl;
hps = &reftet_2f_1e_0va; break;
}
case HP_TET_2F_1E_0VB:
{
*testout << "hp_tet_2f_1e_0vb needs testing" << endl;
cout << "hp_tet_2f_1e_0vb needs testing" << endl;
hps = &reftet_2f_1e_0vb; break;
}
case HP_TET_3F_0E_0V:
{
*testout << "hp_tet_3f_0e_0v needs testing" << endl;
cout << "hp_tet_3f_0e_0v needs testing" << endl;
hps = &reftet_3f_0e_0v; break;
}
case HP_PRISM: case HP_PRISM:
hps = &refprism; break; hps = &refprism; break;
@ -1717,6 +1756,7 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
} }
} }
(*testout) << "singular edges = " << edges << endl;
(*testout) << "singular faces = " << faces << endl; (*testout) << "singular faces = " << faces << endl;
(*testout) << "singular faces_edges = " << face_edges << endl; (*testout) << "singular faces_edges = " << face_edges << endl;
} }
@ -1844,7 +1884,6 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
bool sing = CheckSingularities(mesh, edges, edgepoint_dom, bool sing = CheckSingularities(mesh, edges, edgepoint_dom,
cornerpoint, edgepoint, faces, face_edges, cornerpoint, edgepoint, faces, face_edges,
surf_edges, facepoint, levels, act_ref); surf_edges, facepoint, levels, act_ref);
if (act_ref == 1 && split == SPLIT_ALFELD) if (act_ref == 1 && split == SPLIT_ALFELD)
sing = true; sing = true;
if(sing==0) return(sing); if(sing==0) return(sing);
@ -1855,6 +1894,7 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
(*testout) << "edgepoint_dom = " << endl << edgepoint_dom << endl; (*testout) << "edgepoint_dom = " << endl << edgepoint_dom << endl;
for( int i = 0; i<elements.Size(); i++) for( int i = 0; i<elements.Size(); i++)
{ {
// *testout << "classify element " << i << endl; // *testout << "classify element " << i << endl;
@ -1873,7 +1913,7 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
{ {
case HP_TET: case HP_TET:
{ {
hpel.type = ClassifyTet(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces,face_edges, surf_edges, facepoint); hpel.type = ClassifyTet(hpel, edges, edgepoint_dom, cornerpoint, edgepoint, faces,face_edges, surf_edges, facepoint);
break; break;
} }
case HP_PRISM: case HP_PRISM:
@ -1966,11 +2006,10 @@ bool CheckSingularities(Mesh & mesh, INDEX_2_HASHTABLE<int> & edges, INDEX_2_HAS
PrintMessage(3, "undefined elements update classification: ", cnt_undef); PrintMessage(3, "undefined elements update classification: ", cnt_undef);
PrintMessage(3, "non-implemented in update classification: ", cnt_nonimplement); PrintMessage(3, "non-implemented in update classification: ", cnt_nonimplement);
for (int i = 0; i < misses.Size(); i++) for (int i = 0; i < misses.Size(); i++)
if (misses[i]) if (misses[i])
cout << " in update classification missing case " << i << " occurred " << misses[i] << " times" << endl; cout << " in update classification missing case " << i << " occurred " << misses[i] << " times" << endl;
return(sing); return(sing);
} }
} }

View File

@ -108,6 +108,7 @@ enum HPREF_ELEMENT_TYPE {
HP_TET = 100, // no singular vertex/edge HP_TET = 100, // no singular vertex/edge
HP_NONETET, // make void
HP_TET_0E_1V, // V1 HP_TET_0E_1V, // V1
HP_TET_0E_2V, // V1,2 HP_TET_0E_2V, // V1,2
HP_TET_0E_3V, // V1,2,3 HP_TET_0E_3V, // V1,2,3
@ -154,14 +155,27 @@ enum HPREF_ELEMENT_TYPE {
HP_TET_3EC_0V = 430, // 3 edges chain, alter HP_TET_3EC_0V = 430, // 3 edges chain, alter
HP_TET_3EC_1V, // 3 edges chain, alter HP_TET_3EC_1V, // 3 edges chain, alter
HP_TET_3EC_2V, // 3 edges chain, alter HP_TET_3EC_2V, // 3 edges chain, alter
HP_TET_3ED_3V, // 3 edges in a loop e12, e13, e23 NEW .. done
HP_TET_1F_0E_0V = 500, // 1 singular face HP_TET_1F_0E_0V = 500, // 1 singular face
HP_TET_1F_0E_1VA, // 1 sing vertex in face (V2) HP_TET_1F_0E_1VA, // 1 sing vertex in face (V2) NEEDS FIX (split to pyramids ?)
HP_TET_1F_0E_1VB, // 1 sing vertex not in face (V1) HP_TET_1F_0E_1VB, // 1 sing vertex not in face (V1)
HP_TET_1F_0E_2V, // 2 sing vertex in face (V2,V3) NEW .. done
HP_TET_1F_1EA_0V, // 1 sing edge not in face HP_TET_1F_1EA_0V, // 1 sing edge not in face
HP_TET_1F_1EB_0V, // 1 sing edge in face HP_TET_1F_1EB_0V, // 1 sing edge in face
HP_TET_1F_1E_2VA, // 1 sing edge not in face (e12), sing v2,v3 NEW
HP_TET_1F_1E_2VB, // 1 sing edge not in face (e12), sing v2,v4 NEW
HP_TET_1F_1E_2VC, // 1 sing edge not in face (e12), sing v3,v4 NEW
HP_TET_1F_2E_0VA, // edge6 && fedge3 .. 1 in face, 1 not in face NEW
HP_TET_1F_2E_0VB, // edge6 && fedge2 .. 1 in face, 1 not in face NEW
HP_TET_2F_0E_0V = 600, // 2 singular faces HP_TET_2F_0E_0V = 600, // 2 singular faces
HP_TET_2F_0E_1V, // 2 singular faces f234, f134, sing point V4 NEW
HP_TET_2F_1E_0VA, // 2 singular faces, sing edge e4 NEW
HP_TET_2F_1E_0VB, // 2 singular faces, sing edge e5 NEW
HP_TET_3F_0E_0V = 700, // 3 singular faces, no additional points or edges NEW
HP_PRISM = 1000, HP_PRISM = 1000,
HP_PRISM_SINGEDGE, HP_PRISM_SINGEDGE,

View File

@ -678,6 +678,9 @@ DLL_HEADER void ExportNetgenMeshing(py::module &m)
.def_property("surfnr", &FaceDescriptor::SurfNr, &FaceDescriptor::SetSurfNr) .def_property("surfnr", &FaceDescriptor::SurfNr, &FaceDescriptor::SetSurfNr)
.def_property("domin", &FaceDescriptor::DomainIn, &FaceDescriptor::SetDomainIn) .def_property("domin", &FaceDescriptor::DomainIn, &FaceDescriptor::SetDomainIn)
.def_property("domout", &FaceDescriptor::DomainOut, &FaceDescriptor::SetDomainOut) .def_property("domout", &FaceDescriptor::DomainOut, &FaceDescriptor::SetDomainOut)
.def_property("domin_singular", &FaceDescriptor::DomainInSingular, &FaceDescriptor::SetDomainInSingular)
.def_property("domout_singular", &FaceDescriptor::DomainOutSingular, &FaceDescriptor::SetDomainOutSingular)
.def_property("bc", &FaceDescriptor::BCProperty, &FaceDescriptor::SetBCProperty) .def_property("bc", &FaceDescriptor::BCProperty, &FaceDescriptor::SetBCProperty)
.def_property("bcname", .def_property("bcname",
[](FaceDescriptor & self) -> string { return self.GetBCName(); }, [](FaceDescriptor & self) -> string { return self.GetBCName(); },