p4est_connectivity_t * p8est_connectivity_new_rotwrap (void) { const p4est_topidx_t num_vertices = 8; const p4est_topidx_t num_trees = 1; const p4est_topidx_t num_edges = 4; const p4est_topidx_t num_corners = 1; const double vertices[8 * 3] = { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, }; const p4est_topidx_t tree_to_vertex[1 * 8] = { 0, 1, 2, 3, 4, 5, 6, 7, }; const p4est_topidx_t tree_to_tree[1 * 6] = { 0, 0, 0, 0, 0, 0, }; const int8_t tree_to_face[1 * 6] = { 1, 0, 2, 3, 11, 10, }; const p4est_topidx_t tree_to_edge[1 * 12] = { 0, 0, 1, 1, 1, 1, 0, 0, 2, 2, 3, 3, }; const p4est_topidx_t ett_offset[4 + 1] = { 0, 4, 8, 10, 12, }; const p4est_topidx_t edge_to_tree[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; const int8_t edge_to_edge[12] = { 0, 7, 1, 6, 2, 16, 3, 17, 8, 9, 10, 11, }; const p4est_topidx_t tree_to_corner[1 * 8] = { 0, 0, 0, 0, 0, 0, 0, 0, }; const p4est_topidx_t ctt_offset[1 + 1] = { 0, 8, }; const p4est_topidx_t corner_to_tree[8] = { 0, 0, 0, 0, 0, 0, 0, 0, }; const int8_t corner_to_corner[8] = { 0, 1, 2, 3, 4, 5, 6, 7, }; return p4est_connectivity_new_copy (num_vertices, num_trees, num_edges, num_corners, vertices, tree_to_vertex, tree_to_tree, tree_to_face, tree_to_edge, ett_offset, edge_to_tree, edge_to_edge, tree_to_corner, ctt_offset, corner_to_tree, corner_to_corner); }
p4est_connectivity_t * p4est_connectivity_new_trap (void) { const p4est_topidx_t num_vertices = 4; const p4est_topidx_t num_trees = 1; const p4est_topidx_t num_ctt = 0; const double vertices[4 * 3] = { 0, 0, 0, 1, -.5, 0, 0, 1, 0, 1, 1.5, 0, }; const p4est_topidx_t tree_to_vertex[1 * 4] = { 0, 1, 2, 3, }; const p4est_topidx_t tree_to_tree[1 * 4] = { 0, 0, 0, 0, }; const int8_t tree_to_face[1 * 4] = { 0, 1, 2, 3, }; return p4est_connectivity_new_copy (num_vertices, num_trees, 0, vertices, tree_to_vertex, tree_to_tree, tree_to_face, NULL, &num_ctt, NULL, NULL); }
p4est_connectivity_t * p8est_connectivity_new_unitcube (void) { const p4est_topidx_t num_vertices = 8; const p4est_topidx_t num_trees = 1; const p4est_topidx_t num_ett = 0; const p4est_topidx_t num_ctt = 0; const double vertices[8 * 3] = { 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, }; const p4est_topidx_t tree_to_vertex[1 * 8] = { 0, 1, 2, 3, 4, 5, 6, 7, }; const p4est_topidx_t tree_to_tree[1 * 6] = { 0, 0, 0, 0, 0, 0, }; const int8_t tree_to_face[1 * 6] = { 0, 1, 2, 3, 4, 5, }; return p4est_connectivity_new_copy (num_vertices, num_trees, 0, 0, vertices, tree_to_vertex, tree_to_tree, tree_to_face, NULL, &num_ett, NULL, NULL, NULL, &num_ctt, NULL, NULL); }
p4est_connectivity_t * p8est_connectivity_new_twowrap (void) { const p4est_topidx_t num_vertices = 12; const p4est_topidx_t num_trees = 2; const p4est_topidx_t num_ett = 0; const p4est_topidx_t num_ctt = 0; const double vertices[12 * 3] = { 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 0, 0, 1, 1, 0, 1, 2, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, }; const p4est_topidx_t tree_to_vertex[2 * 8] = { 3, 9, 0, 6, 4, 10, 1, 7, 8, 2, 7, 1, 11, 5, 10, 4, }; const p4est_topidx_t tree_to_tree[2 * 6] = { 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, }; const int8_t tree_to_face[2 * 6] = { 0, 1, 2, 3, 20, 21, 0, 1, 22, 23, 4, 5, }; return p4est_connectivity_new_copy (num_vertices, num_trees, 0, 0, vertices, tree_to_vertex, tree_to_tree, tree_to_face, NULL, &num_ett, NULL, NULL, NULL, &num_ctt, NULL, NULL); }
p4est_connectivity_t * p8est_connectivity_new_sphere (void) { /* *INDENT-OFF* */ const p4est_topidx_t num_vertices = 16; const p4est_topidx_t num_trees = 13; const p4est_topidx_t num_edges = 12; const p4est_topidx_t num_corners = 0; const p4est_topidx_t ctt_offset = 0; const double vertices[16 * 3] = { -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, -1, 2, 1, -1, 2, -1, 1, 2, 1, 1, 2, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, 1, 1, 1, 1, 1, }; const p4est_topidx_t tree_to_vertex[13 * 8] = { 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, }; const p4est_topidx_t tree_to_tree[13 * 6] = { 5, 3, 4, 1, 6, 0, 5, 3, 0, 2, 7, 1, 5, 3, 1, 4, 8, 2, 2, 0, 1, 4, 9, 3, 2, 0, 3, 5, 10, 4, 2, 0, 4, 1, 11, 5, 11, 9, 10, 7, 12, 0, 11, 9, 6, 8, 12, 1, 11, 9, 7, 10, 12, 2, 8, 6, 7, 10, 12, 3, 8, 6, 9, 11, 12, 4, 8, 6, 10, 7, 12, 5, 11, 9, 6, 8, 10, 7, }; const int8_t tree_to_face[13 * 6] = { 1, 7, 7, 2, 5, 5, 9, 8, 3, 2, 5, 5, 6, 0, 3, 6, 5, 5, 1, 7, 7, 2, 5, 5, 9, 8, 3, 2, 5, 5, 6, 0, 3, 6, 5, 5, 1, 7, 7, 2, 2, 4, 9, 8, 3, 2, 5, 4, 6, 0, 3, 6, 15, 4, 1, 7, 7, 2, 19, 4, 9, 8, 3, 2, 22, 4, 6, 0, 3, 6, 6, 4, 10, 22, 4, 16, 22, 4, }; const p4est_topidx_t tree_to_edge[13 * 12] = { 0, 2, -1, -1, 8, 9, -1, -1, -1, -1, -1, -1, 2, 3, -1, -1, 6, 7, -1, -1, -1, -1, -1, -1, 3, 1, -1, -1, 10, 11, -1, -1, -1, -1, -1, -1, 7, 5, -1, -1, 11, 9, -1, -1, -1, -1, -1, -1, 5, 4, -1, -1, 1, 0, -1, -1, -1, -1, -1, -1, 4, 6, -1, -1, 10, 8, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2, -1, -1, 8, 9, -1, -1, -1, -1, -1, -1, 2, 3, -1, -1, 6, 7, -1, -1, -1, -1, -1, -1, 3, 1, -1, -1, 10, 11, -1, -1, -1, -1, -1, -1, 7, 5, -1, -1, 11, 9, -1, -1, -1, -1, -1, -1, 5, 4, -1, -1, 1, 0, -1, -1, -1, -1, -1, -1, 4, 6, -1, -1, 10, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, }; const p4est_topidx_t ett_offset[12 + 1] = { 0, 4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, }; const p4est_topidx_t edge_to_tree[48] = { 0, 4, 6, 10, 2, 4, 8, 10, 0, 1, 6, 7, 1, 2, 7, 8, 4, 5, 10, 11, 3, 4, 9, 10, 1, 5, 7, 11, 1, 3, 7, 9, 0, 5, 6, 11, 0, 3, 6, 9, 2, 5, 8, 11, 2, 3, 8, 9, }; const int8_t edge_to_edge[48] = { 0, 17, 2, 19, 1, 16, 3, 18, 1, 0, 3, 2, 1, 0, 3, 2, 13, 12, 15, 14, 13, 12, 15, 14, 4, 13, 6, 15, 5, 12, 7, 14, 4, 5, 6, 7, 5, 17, 7, 19, 16, 4, 18, 6, 17, 16, 19, 18, }; #if 0 /* corner information would be redundant */ const p4est_topidx_t tree_to_corner[13 * 8] = { 0, 1, 4, 5, -1, -1, -1, -1, 4, 5, 6, 7, -1, -1, -1, -1, 6, 7, 2, 3, -1, -1, -1, -1, 7, 5, 3, 1, -1, -1, -1, -1, 3, 1, 2, 0, -1, -1, -1, -1, 2, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 4, 5, -1, -1, -1, -1, 4, 5, 6, 7, -1, -1, -1, -1, 6, 7, 2, 3, -1, -1, -1, -1, 7, 5, 3, 1, -1, -1, -1, -1, 3, 1, 2, 0, -1, -1, -1, -1, 2, 0, 6, 4, -1, -1, -1, -1, -1, -1, -1, -1, }; const p4est_topidx_t ctt_offset[8 + 1] = { 0, 6, 12, 18, 24, 30, 36, 42, 48, }; const p4est_topidx_t corner_to_tree[48] = { 0, 4, 5, 6, 10, 11, 0, 3, 4, 6, 9, 10, 2, 4, 5, 8, 10, 11, 2, 3, 4, 8, 9, 10, 0, 1, 5, 6, 7, 11, 0, 1, 3, 6, 7, 9, 1, 2, 5, 7, 8, 11, 1, 2, 3, 7, 8, 9, }; const int8_t corner_to_corner[48] = { 0, 3, 1, 4, 7, 5, 1, 3, 1, 5, 7, 5, 2, 2, 0, 6, 6, 4, 3, 2, 0, 7, 6, 4, 2, 0, 3, 6, 4, 7, 3, 1, 1, 7, 5, 5, 2, 0, 2, 6, 4, 6, 3, 1, 0, 7, 5, 4, }; #endif /* 0 */ /* *INDENT-ON* */ return p4est_connectivity_new_copy (num_vertices, num_trees, num_edges, num_corners, vertices, tree_to_vertex, tree_to_tree, tree_to_face, tree_to_edge, ett_offset, edge_to_tree, edge_to_edge, NULL, &ctt_offset, NULL, NULL); }
p4est_connectivity_t * p8est_connectivity_new_shell (void) { /* *INDENT-OFF* */ const p4est_topidx_t num_vertices = 18; const p4est_topidx_t num_trees = 24; const p4est_topidx_t num_edges = 18; const p4est_topidx_t num_corners = 0; const p4est_topidx_t ctt_offset = 0; const double vertices[18 * 3] = { -1, -1, 1, 0, -1, 1, 1, -1, 1, -1, 0, 1, 0, 0, 1, 1, 0, 1, -1, 1, 1, 0, 1, 1, 1, 1, 1, -1, -1, 2, 0, -1, 2, 1, -1, 2, -1, 0, 2, 0, 0, 2, 1, 0, 2, -1, 1, 2, 0, 1, 2, 1, 1, 2, }; const p4est_topidx_t tree_to_vertex[24 * 8] = { 0, 1, 3, 4, 9, 10, 12, 13, 1, 2, 4, 5, 10, 11, 13, 14, 3, 4, 6, 7, 12, 13, 15, 16, 4, 5, 7, 8, 13, 14, 16, 17, 0, 1, 3, 4, 9, 10, 12, 13, 1, 2, 4, 5, 10, 11, 13, 14, 3, 4, 6, 7, 12, 13, 15, 16, 4, 5, 7, 8, 13, 14, 16, 17, 0, 1, 3, 4, 9, 10, 12, 13, 1, 2, 4, 5, 10, 11, 13, 14, 3, 4, 6, 7, 12, 13, 15, 16, 4, 5, 7, 8, 13, 14, 16, 17, 0, 1, 3, 4, 9, 10, 12, 13, 1, 2, 4, 5, 10, 11, 13, 14, 3, 4, 6, 7, 12, 13, 15, 16, 4, 5, 7, 8, 13, 14, 16, 17, 0, 1, 3, 4, 9, 10, 12, 13, 1, 2, 4, 5, 10, 11, 13, 14, 3, 4, 6, 7, 12, 13, 15, 16, 4, 5, 7, 8, 13, 14, 16, 17, 0, 1, 3, 4, 9, 10, 12, 13, 1, 2, 4, 5, 10, 11, 13, 14, 3, 4, 6, 7, 12, 13, 15, 16, 4, 5, 7, 8, 13, 14, 16, 17, }; const p4est_topidx_t tree_to_tree[24 * 6] = { 18, 1, 14, 2, 0, 0, 0, 23, 15, 3, 1, 1, 16, 3, 0, 4, 2, 2, 2, 21, 1, 5, 3, 3, 16, 5, 2, 6, 4, 4, 4, 21, 3, 7, 5, 5, 17, 7, 4, 8, 6, 6, 6, 20, 5, 9, 7, 7, 17, 9, 6, 10, 8, 8, 8, 20, 7, 11, 9, 9, 19, 11, 8, 12, 10, 10, 10, 22, 9, 13, 11, 11, 19, 13, 10, 14, 12, 12, 12, 22, 11, 15, 13, 13, 18, 15, 12, 0, 14, 14, 14, 23, 13, 1, 15, 15, 2, 17, 4, 18, 16, 16, 16, 8, 6, 19, 17, 17, 0, 19, 16, 14, 18, 18, 18, 10, 17, 12, 19, 19, 9, 21, 7, 22, 20, 20, 20, 3, 5, 23, 21, 21, 11, 23, 20, 13, 22, 22, 22, 1, 21, 15, 23, 23, }; const int8_t tree_to_face[24 * 6] = { 6, 0, 3, 2, 4, 5, 1, 7, 3, 2, 4, 5, 6, 0, 3, 2, 4, 5, 1, 7, 3, 2, 4, 5, 2, 0, 3, 2, 4, 5, 1, 8, 3, 2, 4, 5, 2, 0, 3, 2, 4, 5, 1, 8, 3, 2, 4, 5, 1, 0, 3, 2, 4, 5, 1, 0, 3, 2, 4, 5, 1, 0, 3, 2, 4, 5, 1, 0, 3, 2, 4, 5, 9, 0, 3, 2, 4, 5, 1, 3, 3, 2, 4, 5, 9, 0, 3, 2, 4, 5, 1, 3, 3, 2, 4, 5, 6, 0, 0, 2, 4, 5, 1, 0, 0, 2, 4, 5, 6, 0, 3, 6, 4, 5, 1, 0, 3, 6, 4, 5, 1, 0, 7, 2, 4, 5, 1, 7, 7, 2, 4, 5, 1, 0, 3, 1, 4, 5, 1, 7, 3, 1, 4, 5, }; const p4est_topidx_t tree_to_edge[24 * 12] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, 8, 6, 0, -1, -1, -1, -1, -1, -1, -1, -1, 8, -1, 0, 7, -1, -1, -1, -1, -1, -1, -1, -1, 6, 0, -1, 9, -1, -1, -1, -1, -1, -1, -1, -1, 0, 7, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 9, 10, 1, -1, -1, -1, -1, -1, -1, -1, -1, 9, -1, 1, 11, -1, -1, -1, -1, -1, -1, -1, -1, 10, 1, -1, 12, -1, -1, -1, -1, -1, -1, -1, -1, 1, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 13, 2, -1, -1, -1, -1, -1, -1, -1, -1, 12, -1, 2, 14, -1, -1, -1, -1, -1, -1, -1, -1, 13, 2, -1, 15, -1, -1, -1, -1, -1, -1, -1, -1, 2, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 15, 16, 3, -1, -1, -1, -1, -1, -1, -1, -1, 15, -1, 3, 17, -1, -1, -1, -1, -1, -1, -1, -1, 16, 3, -1, 8, -1, -1, -1, -1, -1, -1, -1, -1, 3, 17, 8, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 10, 6, 4, -1, -1, -1, -1, -1, -1, -1, -1, 10, -1, 4, 13, -1, -1, -1, -1, -1, -1, -1, -1, 6, 4, -1, 16, -1, -1, -1, -1, -1, -1, -1, -1, 4, 13, 16, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 11, 14, 5, -1, -1, -1, -1, -1, -1, -1, -1, 11, -1, 5 , 7, -1, -1, -1, -1, -1, -1, -1, -1, 14, 5, -1, 17, -1, -1, -1, -1, -1, -1, -1, -1, 5, 7, 17, -1, }; const p4est_topidx_t ett_offset[18 + 1] = { 0, 4 , 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, }; const p4est_topidx_t edge_to_tree[72] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 0, 2, 16, 18, 1, 3, 21, 23, 0, 1, 14, 15, 2, 3, 4, 5, 4, 6, 16, 17, 5, 7, 20, 21, 6, 7, 8, 9, 8, 10, 17, 19, 9, 11, 20, 22, 10, 11, 12, 13, 12, 14, 18, 19, 13, 15, 22, 23, }; const int8_t edge_to_edge[72] = { 11, 10, 9, 8, 11, 10, 9, 8, 11, 10, 9, 8, 11, 10, 9, 8, 11, 10, 9, 8, 11, 10, 9, 8, 10, 8, 10, 8, 11, 9, 11, 9, 9, 8, 11, 10, 11, 10, 9, 8, 10, 8, 9, 8, 11, 9, 9, 8, 11, 10, 9, 8, 10, 8, 11, 9, 11, 9, 10, 8, 11, 10, 9, 8, 10, 8, 11, 10, 11, 9, 11, 10, }; /* *INDENT-ON* */ return p4est_connectivity_new_copy (num_vertices, num_trees, num_edges, num_corners, vertices, tree_to_vertex, tree_to_tree, tree_to_face, tree_to_edge, ett_offset, edge_to_tree, edge_to_edge, NULL, &ctt_offset, NULL, NULL); }
p4est_connectivity_t * p8est_connectivity_new_rotcubes (void) { const p4est_topidx_t num_vertices = 26; const p4est_topidx_t num_trees = 6; const p4est_topidx_t num_edges = 3; const p4est_topidx_t num_corners = 1; const double vertices[26 * 3] = { 0, 0, 0, 1, 0, 2, 2, 0, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 1, -1, 0, 2, -1, 0, 1, -1, 1, 2, -1, 1, 2, 1, 1, 1, 0, 1, 2, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 2, 1, 0, 0, 1, 1, 2, 0, 1, 2, 2.5, 1.5, 2, 2, 1.5, 2, 2, 1.5, 2.5, 2, .5, 2.5, 2.5, .5, 2, 2, .5, 2, }; const p4est_topidx_t tree_to_vertex[6 * 8] = { 0, 17, 3, 4, 15, 11, 13, 14, 7, 2, 6, 17, 9, 12, 8, 11, 2, 12, 5, 10, 17, 11, 4, 14, 19, 13, 18, 14, 16, 15, 1, 11, 14, 11, 21, 25, 18, 1, 22, 23, 21, 20, 25, 24, 14, 10, 11, 12, }; const p4est_topidx_t tree_to_tree[6 * 6] = { 0, 2, 0, 0, 0, 3, 1, 2, 1, 1, 1, 1, 2, 5, 1, 2, 2, 0, 3, 0, 3, 4, 3, 3, 4, 4, 3, 4, 5, 4, 4, 5, 5, 5, 5, 2, }; const int8_t tree_to_face[6 * 6] = { 0, 5, 2, 3, 4, 13, 0, 2, 2, 3, 4, 5, 0, 23, 1, 3, 4, 1, 0, 17, 2, 8, 4, 5, 0, 1, 9, 3, 12, 5, 16, 1, 2, 3, 4, 19, }; const p4est_topidx_t tree_to_edge[6 * 12] = { -1, -1, -1, -1, -1, -1, -1, 0, -1, 2, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 2, -1, -1, 2, -1, -1, -1, -1, 0, -1, 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, -1, -1, -1, -1, -1, }; const p4est_topidx_t ett_offset[3 + 1] = { 0, 5, 8, 11 }; const p4est_topidx_t edge_to_tree[11] = { 0, 2, 3, 4, 5, 1, 2, 5, 0, 1, 2 }; const int8_t edge_to_edge[11] = { 7, 7, 23, 12, 18, 7, 9, 15, 9, 11, 2 }; const p4est_topidx_t tree_to_corner[6 * 8] = { -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, -1, }; const p4est_topidx_t ctt_offset[1 + 1] = { 0, 6 }; const p4est_topidx_t corner_to_tree[6] = { 0, 1, 2, 3, 4, 5 }; const int8_t corner_to_corner[6] = { 5, 7, 5, 7, 1, 6 }; return p4est_connectivity_new_copy (num_vertices, num_trees, num_edges, num_corners, vertices, tree_to_vertex, tree_to_tree, tree_to_face, tree_to_edge, ett_offset, edge_to_tree, edge_to_edge, tree_to_corner, ctt_offset, corner_to_tree, corner_to_corner); }