+ // Schema according to which the splitting is performed.
+ // Each line represents one tetrahedron. The numbering is as follows :
+ //
+ // 7 ------ 6
+ // /| /|
+ // / | / |
+ // 3 ------ 2 |
+ // | | | |
+ // | | | |
+ // | 4-----|- 5
+ // | / | /
+ // 0 ------ 1
+
+ static const int SPLIT_NODES_5[20] = /* WHY not all well oriented ???? */
+ {
+ 0, 1, 5, 2,
+ 0, 4, 5, 7,
+ 0, 3, 7, 2,
+ 5, 6, 7, 2,
+ 0, 2, 5, 7
+ };
+
+ static const int SPLIT_NODES_5_WO[20] = /* WO for well oriented !!! normals of 3 first points are OUTSIDE the TETRA4 */
+ {
+ 0, 5, 1, 2,
+ 0, 4, 5, 7,
+ 0, 3, 7, 2,
+ 5, 7, 6, 2,
+ 0, 5, 2, 7
+ };
+
+ static const int SPLIT_NODES_6[24] = /* WHY all badly oriented ???? */
+ {
+ 0, 1, 5, 6,
+ 0, 2, 1, 6,
+ 0, 5, 4, 6,
+ 0, 4, 7, 6,
+ 0, 3, 2, 6,
+ 0, 7, 3, 6
+ };
+
+ static const int SPLIT_NODES_6_WO[24] = /* WO for well oriented !!! normals of 3 first points are OUTSIDE the TETRA4 */
+ {
+ 0, 5, 1, 6,
+ 0, 1, 2, 6,
+ 0, 4, 5, 6,
+ 0, 7, 4, 6,
+ 0, 2, 3, 6,
+ 0, 3, 7, 6
+ };
+
+ // Each sub-node is the barycenter of 4 other nodes.
+ // For the faces, these are on the orignal mesh.
+ // For the barycenter, the four face sub-nodes are used.
+ static const int GENERAL_24_SUB_NODES[28] =
+ {
+ 0,1,4,5,// sub-node 8 (face)
+ 0,1,2,3,// sub-node 9 (face)
+ 0,3,4,7,// sub-node 10 (face)
+ 1,2,5,6,// sub-node 11 (face)
+ 4,5,6,7,// sub-node 12 (face)
+ 2,3,6,7,// sub-node 13 (face)
+ 8,9,10,11// sub-node 14 (cell)
+ };
+
+ static const int GENERAL_24_SUB_NODES_WO[28] =
+ {
+ 0,4,5,1,// sub-node 8 (face)
+ 0,1,2,3,// sub-node 9 (face)
+ 0,3,7,4,// sub-node 10 (face)
+ 1,5,6,2,// sub-node 11 (face)
+ 4,7,6,5,// sub-node 12 (face)
+ 2,6,7,3,// sub-node 13 (face)
+ 8,9,10,11// sub-node 14 (cell)
+ };
+
+ static const int TETRA_EDGES_GENERAL_24[48] =
+ {
+ // face with center 8
+ 0,1,
+ 1,5,
+ 5,4,
+ 4,0,
+ // face with center 9
+ 0,1,
+ 1,2,
+ 2,3,
+ 3,0,
+ // face with center 10
+ 0,4,
+ 4,7,
+ 7,3,
+ 3,0,
+ // face with center 11
+ 1,5,
+ 5,6,
+ 6,2,
+ 2,1,
+ // face with center 12
+ 5,6,
+ 6,7,
+ 7,4,
+ 4,5,
+ // face with center 13
+ 2,6,
+ 6,7,
+ 7,3,
+ 3,2
+ };
+
+ // Each sub-node is the barycenter of two other nodes.
+ // For the edges, these lie on the original mesh.
+ // For the faces, these are the edge sub-nodes.
+ // For the cell these are two face sub-nodes.
+ static const int GENERAL_48_SUB_NODES[38] =
+ {
+ 0,1, // sub-node 8 (edge)
+ 0,4, // sub-node 9 (edge)
+ 1,5, // sub-node 10 (edge)
+ 4,5, // sub-node 11 (edge)
+ 0,3, // sub-node 12 (edge)
+ 1,2, // sub-node 13 (edge)
+ 4,7, // sub-node 14 (edge)
+ 5,6, // sub-node 15 (edge)
+ 2,3, // sub-node 16 (edge)
+ 3,7, // sub-node 17 (edge)
+ 2,6, // sub-node 18 (edge)
+ 6,7, // sub-node 19 (edge)
+ 8,11, // sub-node 20 (face)
+ 12,13, // sub-node 21 (face)
+ 9,17, // sub-node 22 (face)
+ 10,18, // sub-node 23 (face)
+ 14,15, // sub-node 24 (face)
+ 16,19, // sub-node 25 (face)
+ 20,25 // sub-node 26 (cell)
+ };
+
+ // Define 8 hexahedral subzones as in Grandy, p449
+ // the values correspond to the nodes that correspond to nodes 1,2,3,4,5,6,7,8 in the subcell
+ // For the correspondance of the nodes, see the GENERAL_48_SUB_NODES table in calculateSubNodes
+ static const int GENERAL_48_SUBZONES[64] =
+ {
+ 0,8,21,12,9,20,26,22,
+ 8,1,13,21,20,10,23,26,
+ 12,21,16,3,22,26,25,17,
+ 21,13,2,16,26,23,18,25,
+ 9,20,26,22,4,11,24,14,
+ 20,10,23,26,11,5,15,24,
+ 22,26,25,17,14,24,19,7,
+ 26,23,18,25,24,15,6,19
+ };
+
+ static const int GENERAL_48_SUBZONES_2[64] =
+ {
+ 0,-1,-14,-5,-2,-13,-19,-15,
+ -1,1,-6,-14,-13,-3,-16,-19,
+ -5,-14,-9,3,-15,-19,-18,-10,
+ -14,-6,2,-9,-19,-16,-11,-18,
+ -2,-13,-19,-15,4,-4,-17,-7,
+ -13,-3,-16,-19,-4,5,-8,-17,
+ -15,-19,-18,-10,-7,-17,-12,7,
+ -19,-16,-11,-18,-17,-8,6,-12};
+
+ void SplitHexa8IntoTetras(SplittingPolicy policy, const int *nodalConnBg, const int *nodalConnEnd, const double *coords,
+ std::vector<int>& tetrasNodalConn, std::vector<double>& addCoords);
+
+ INTERPKERNEL_EXPORT void SplitIntoTetras(SplittingPolicy policy, NormalizedCellType gt, const int *nodalConnBg, const int *nodalConnEnd, const double *coords,
+ std::vector<int>& tetrasNodalConn, std::vector<double>& addCoords);
+