diff --git a/libsrc/meshing/topology.cpp b/libsrc/meshing/topology.cpp index d649b23a..1a3c462e 100644 --- a/libsrc/meshing/topology.cpp +++ b/libsrc/meshing/topology.cpp @@ -1878,8 +1878,46 @@ namespace netgen } auto [info, nrs] = parent_faces[i]; - if (nrs[0] == -1) - cout << "************************** unhandled parent-face case **********************" << endl; + if (nrs[0] == -1){ + // hacking for tet red refinements + PointIndex v0 = f3[0]; + auto pa0 = mesh->mlbetweennodes[v0]; + auto pa1 = mesh->mlbetweennodes[f3[1]]; + auto pa2 = mesh->mlbetweennodes[f3[2]]; + // v0 is a coarse vertex ==> f3 is a boundary face + if (v0==pa1[0] || v0==pa1[1]){ + if (pa1[0]==v0){// type 0: bottom left corner + INT<3> parentverts(v0, pa1[1], pa2[1]); + int pafacenr = v2f[parentverts]; + parent_faces[i] = { 16, { pafacenr, -1, -1, -1} }; + //cout << "f "< parentverts(pa1[0], v0, pa2[1]); + int pafacenr = v2f[parentverts]; + parent_faces[i] = { 17, { pafacenr, -1, -1, -1} }; + //cout << "f "< parentverts(pa1[0], pa2[0], v0); + int pafacenr = v2f[parentverts]; + parent_faces[i] = { 18, { pafacenr, -1, -1, -1} }; + //cout << "f "< parentverts(pa0[0], pa0[1], pa1[1]); + int pafacenr = v2f[parentverts]; + parent_faces[i] = { 19, { pafacenr, -1, -1, -1} }; + //cout << "f "<