+/*
+// N8 +------+ N9
+// / \
+// / \
+// N7 + + N10
+// \ /
+// \ /
+// N6 +------+ N11
+// HEXAGONAL PRISM
+// N2 +------+ N3
+// / \
+// / \
+// N1 + + N4
+// \ /
+// \ /
+// N0 +------+ N5
+*/
+static int HexPrism_F [8][7] = { // FORWARD
+ { 0, 1, 2, 3, 4, 5, 0 },
+ { 6,11,10, 9, 8, 7, 6 },
+ { 0, 6, 7, 1, 0, 0, 0 },
+ { 1, 7, 8, 2, 1, 1, 1 },
+ { 2, 8, 9, 3, 2, 2, 2 },
+ { 3, 9,10, 4, 3, 3, 3 },
+ { 4,10,11, 5, 4, 4, 4 },
+ { 5,11, 6, 0, 5, 5, 5 }};
+static int HexPrism_RE [8][7] = { // REVERSED -> EXTERNAL
+ { 0, 5, 4, 3, 2, 1, 0 },
+ { 6,11,10, 9, 8, 7, 6 },
+ { 0, 6, 7, 1, 0, 0, 0 },
+ { 1, 7, 8, 2, 1, 1, 1 },
+ { 2, 8, 9, 3, 2, 2, 2 },
+ { 3, 9,10, 4, 3, 3, 3 },
+ { 4,10,11, 5, 4, 4, 4 },
+ { 5,11, 6, 0, 5, 5, 5 }};
+static int HexPrism_nbN [] = { 6, 6, 4, 4, 4, 4, 4, 4 };
+
+
+/*
+// N3
+// +
+// /|\
+// 7/ | \8
+// / |4 \ QUADRATIC
+// N0 +---|---+ N1 TETRAHEDRON
+// \ +9 /
+// \ | /
+// 6\ | /5
+// \|/
+// +
+// N2
+*/
+static int QuadTetra_F [4][7] = { // FORWARD
+ { 0, 4, 1, 5, 2, 6, 0 }, // All faces have external normals
+ { 0, 7, 3, 8, 1, 4, 0 },
+ { 1, 8, 3, 9, 2, 5, 1 },
+ { 0, 6, 2, 9, 3, 7, 0 }};
+static int QuadTetra_RE [4][7] = { // REVERSED -> FORWARD (EXTERNAL)
+ { 0, 6, 2, 5, 1, 4, 0 }, // All faces have external normals
+ { 0, 4, 1, 8, 3, 7, 0 },
+ { 1, 5, 2, 9, 3, 8, 1 },
+ { 0, 7, 3, 9, 2, 6, 0 }};
+static int QuadTetra_nbN [] = { 6, 6, 6, 6 };
+
+//
+// QUADRATIC
+// PYRAMID
+//
+// +4
+//
+//
+// 10+-----+11
+// | | 9 - middle point for (0,4) etc.
+// | |
+// 9+-----+12
+//
+// 6
+// 1+----+----+2
+// | |
+// | |
+// 5+ +7
+// | |
+// | |
+// 0+----+----+3
+// 8
+static int QuadPyram_F [5][9] = { // FORWARD
+ { 0, 5, 1, 6, 2, 7, 3, 8, 0 }, // All faces have external normals
+ { 0, 9, 4, 10,1, 5, 0, 4, 4 },
+ { 1, 10,4, 11,2, 6, 1, 4, 4 },
+ { 2, 11,4, 12,3, 7, 2, 4, 4 },
+ { 3, 12,4, 9, 0, 8, 3, 4, 4 }};
+static int QuadPyram_RE [5][9] = { // REVERSED -> FORWARD (EXTERNAL)
+ { 0, 8, 3, 7, 2, 6, 1, 5, 0 }, // All faces but a bottom have external normals
+ { 0, 5, 1, 10,4, 9, 0, 4, 4 },
+ { 1, 6, 2, 11,4, 10,1, 4, 4 },
+ { 2, 7, 3, 12,4, 11,2, 4, 4 },
+ { 3, 8, 0, 9, 4, 12,3, 4, 4 }};
+static int QuadPyram_nbN [] = { 8, 6, 6, 6, 6 };
+
+/*
+// + N4
+// /|\
+// 9/ | \10
+// / | \
+// / | \
+// N3 +----+----+ N5
+// | |11 |
+// | | |
+// | +13 | QUADRATIC
+// | | | PENTAHEDRON
+// 12+ | +14
+// | | |
+// | | |
+// | + N1 |
+// | / \ |
+// | 6/ \7 |
+// | / \ |
+// |/ \|
+// N0 +---------+ N2
+// 8
+*/
+static int QuadPenta_F [5][9] = { // FORWARD
+ { 0, 6, 1, 7, 2, 8, 0, 0, 0 },
+ { 3,11, 5, 10,4, 9, 3, 3, 3 },
+ { 0, 12,3, 9, 4, 13,1, 6, 0 },
+ { 1, 13,4, 10,5, 14,2, 7, 1 },
+ { 0, 8, 2, 14,5, 11,3, 12,0 }};
+static int QuadPenta_RE [5][9] = { // REVERSED -> EXTERNAL
+ { 0, 8, 2, 7, 1, 6, 0, 0, 0 },
+ { 3, 9, 4, 10,5, 11,3, 3, 3 },
+ { 0, 6, 1, 13,4, 9, 3, 12,0 },
+ { 1, 7, 2, 14,5, 10,4, 13,1 },
+ { 0, 12,3, 11,5, 14,2, 8, 0 }};
+static int QuadPenta_nbN [] = { 6, 6, 8, 8, 8 };
+
+/*
+// 13
+// N5+-----+-----+N6 +-----+-----+
+// /| /| /| /|
+// 12+ | 14+ | + | +25 + |
+// / | / | / | / |
+// N4+-----+-----+N7 | QUADRATIC +-----+-----+ | Central nodes
+// | | 15 | | HEXAHEDRON | | | | of tri-quadratic
+// | | | | | | | | HEXAHEDRON
+// | 17+ | +18 | + 22+ | +
+// | | | | |21 | | |
+// | | | | | + | 26+ | + |
+// | | | | | | |23 |
+// 16+ | +19 | + | +24 + |
+// | | | | | | | |
+// | | 9 | | | | | |
+// | N1+-----+-|---+N2 | +-----+-|---+
+// | / | / | / | /
+// | +8 | +10 | + 20+ | +
+// |/ |/ |/ |/
+// N0+-----+-----+N3 +-----+-----+
+// 11
+*/
+static int QuadHexa_F [6][9] = { // FORWARD
+ { 0, 8, 1, 9, 2, 10,3, 11,0 }, // all face normals are external,
+ { 4, 15,7, 14,6, 13,5, 12,4 },
+ { 0, 16,4, 12,5, 17,1, 8, 0 },
+ { 1, 17,5, 13,6, 18,2, 9, 1 },
+ { 3, 10,2, 18,6, 14,7, 19,3 },
+ { 0, 11,3, 19,7, 15,4, 16,0 }};
+static int QuadHexa_RE [6][9] = { // REVERSED -> EXTERNAL
+ { 0, 11,3, 10,2, 9, 1, 8, 0 }, // all face normals are external
+ { 4, 12,5, 13,6, 14,7, 15,4 },
+ { 0, 8, 1, 17,5, 12,4, 16,0 },
+ { 1, 9, 2, 18,6, 13,5, 17,1 },
+ { 3, 19,7, 14,6, 18,2, 10,3 },
+ { 0, 16,4, 15,7, 19,3, 11,0 }};
+static int QuadHexa_nbN [] = { 8, 8, 8, 8, 8, 8 };
+
+static int TriQuadHexa_F [6][9] = { // FORWARD
+ { 0, 8, 1, 9, 2, 10,3, 11, 20 }, // all face normals are external
+ { 4, 15,7, 14,6, 13,5, 12, 25 },
+ { 0, 16,4, 12,5, 17,1, 8, 21 },
+ { 1, 17,5, 13,6, 18,2, 9, 22 },
+ { 3, 10,2, 18,6, 14,7, 19, 23 },
+ { 0, 11,3, 19,7, 15,4, 16, 24 }};
+static int TriQuadHexa_RE [6][9] = { // REVERSED -> EXTERNAL
+ { 0, 11,3, 10,2, 9, 1, 8, 20 }, // opposite faces are neighbouring,
+ { 4, 12,5, 13,6, 14,7, 15, 25 }, // all face normals are external
+ { 0, 8, 1, 17,5, 12,4, 16, 21 },
+ { 1, 9, 2, 18,6, 13,5, 17, 22 },
+ { 3, 19,7, 14,6, 18,2, 10, 23 },
+ { 0, 16,4, 15,7, 19,3, 11, 24 }};
+static int TriQuadHexa_nbN [] = { 9, 9, 9, 9, 9, 9 };
+
+