6#include <kernel/geometry/test_aux/tetris_hexa.hpp> 
    7#include <kernel/geometry/test_aux/copy_comp_set.hpp> 
   15      HexaMesh* create_tetris_mesh_3d()
 
   17        Index num_entities[] =
 
   26        HexaMesh* mesh = 
new HexaMesh(num_entities);
 
   52        copy_vtx(mesh->get_vertex_set(), vtx);
 
   94        copy_idx(mesh->get_index_set<1,0>(), v_e);
 
  121        copy_idx(mesh->get_index_set<2,0>(), v_q);
 
  148        copy_idx(mesh->get_index_set<2,1>(), e_q);
 
  153           8,  9, 11, 12,  0,  1,  3,  4,
 
  154          10, 11, 13, 14,  2,  3,  5,  6,
 
  155          11, 12, 14, 15,  3,  4,  6,  7,
 
  156          16, 17, 18, 19,  8,  9, 11, 12
 
  158        copy_idx(mesh->get_index_set<3, 0>(), v_c);
 
  163          18, 22,  0,  4, 19, 20,  1,  2, 10, 11, 13, 14,
 
  164          21, 26,  3,  8, 23, 24,  5,  6, 12, 13, 15, 16,
 
  165          22, 27,  4,  9, 24, 25,  6,  7, 13, 14, 16, 17,
 
  166          32, 35, 18, 22, 33, 34, 19, 20, 28, 29, 30, 31
 
  168        copy_idx(mesh->get_index_set<3,1>(), e_c);
 
  176          20, 13, 16, 19, 17, 18
 
  178        copy_idx(mesh->get_index_set<3,2>(), f_c);
 
  184      void validate_refined_tetris_mesh_3d(
const HexaMesh& mesh)
 
  187        if(mesh.get_num_entities(0) != 81)
 
  188          throw String(
"Vertex count mismatch");
 
  189        if(mesh.get_num_entities(1) != 180)
 
  190          throw String(
"Edge count mismatch");
 
  191        if(mesh.get_num_entities(2) != 132)
 
  192          throw String(
"Quad count mismatch");
 
  193        if(mesh.get_num_entities(3) != 32)
 
  194          throw String(
"Cube count mismatch");
 
  199        static const Real vtx[] =
 
  292        static const Index v_e[] =
 
  482        static const Index v_q[] =
 
  621        static const Index v_c[] =
 
  623          8, 38, 39, 69, 30, 59, 60, 77, 
 
  624          38, 9, 69, 40, 59, 31, 77, 61,
 
  625          39, 69, 11, 42, 60, 77, 33, 63,
 
  626          69, 40, 42, 12, 77, 61, 63, 34,
 
  627          30, 59, 60, 77, 0, 20, 21, 56,
 
  628          59, 31, 77, 61, 20, 1, 56, 22,
 
  629          60, 77, 33, 63, 21, 56, 3, 24,
 
  630          77, 61, 63, 34, 56, 22, 24, 4,
 
  631          10, 41, 43, 70, 32, 62, 64, 78,
 
  632          41, 11, 70, 44, 62, 33, 78, 65,
 
  633          43, 70, 13, 46, 64, 78, 35, 67, 
 
  634          70, 44, 46, 14, 78, 65, 67, 36,
 
  635          32, 62, 64, 78, 2, 23, 25, 57,
 
  636          62, 33, 78, 65, 23, 3, 57, 26,
 
  637          64, 78, 35, 67, 25, 57, 5, 28,
 
  638          78, 65, 67, 36, 57, 26, 28, 6,
 
  639          11, 42, 44, 71, 33, 63, 65, 79,
 
  640          42, 12, 71, 45, 63, 34, 79, 66,
 
  641          44, 71, 14, 47, 65, 79, 36, 68,
 
  642          71, 45, 47, 15, 79, 66, 68, 37,
 
  643          33, 63, 65, 79,3, 24, 26, 58, 
 
  644          63, 34, 79, 66, 24, 4, 58, 27,
 
  645          65, 79, 36, 68, 26, 58, 6, 29,
 
  646          79, 66, 68, 37, 58, 27, 29, 7,
 
  647          16, 52, 53, 76, 48, 72, 73, 80,
 
  648          52, 17, 76, 54, 72, 49, 80, 74,
 
  649          53, 76, 18, 55, 73, 80, 50, 75,
 
  650          76, 54, 55, 19, 80, 74, 75, 51,
 
  651          48, 72, 73, 80, 8, 38, 39, 69,
 
  652          72, 49, 80, 74,38, 9, 69, 40,
 
  653          73, 80, 50, 75, 39, 69, 11, 42, 
 
  654          80, 74, 75, 51, 69, 40, 42, 12
 
  658        static const Index e_q[] =
 
  827        static const Index e_c[] =
 
  829          36, 126, 86, 160, 38, 124, 90, 158, 20, 84, 88, 156,
 
  830          37, 127, 87, 161, 124, 40, 158, 94, 84, 22, 156, 92,
 
  831          126, 44, 160, 102, 39, 125, 91, 159, 88, 156, 26, 100,
 
  832          127, 45, 161, 103, 125, 41, 159, 95, 156, 92, 100, 28,
 
  833          86, 160, 0, 74, 90, 158, 2, 72, 21, 85, 89, 157,
 
  834          87, 161, 1, 75, 158, 94, 72, 4, 85, 23, 157, 93,
 
  835          160, 102, 74, 8,91, 159, 3, 73, 89, 157, 27, 101,
 
  836          161, 103, 75, 9, 159, 95, 73, 5, 157, 93, 101, 29,
 
  838          42, 130, 98, 166, 46, 128, 106, 164, 24, 96, 104, 162,
 
  839          43, 131, 99, 167, 128, 48, 164, 110, 96, 26, 162, 108,
 
  840          130, 52, 166, 118, 47, 129, 107, 165, 104, 162, 30, 116,
 
  841          131, 53, 167, 119, 129, 49, 165, 111, 162, 108, 116, 32,
 
  842          98, 166, 6, 78, 106, 164, 10, 76, 25, 97, 105, 163,
 
  843          99, 167, 7, 79, 164, 110, 76, 12, 97, 27, 163, 109,
 
  844          166, 118, 78, 16, 107, 165, 11, 77, 105, 163, 31, 117,
 
  845          167, 119, 79, 17, 165, 111, 77, 13, 163, 109, 117, 33,
 
  847          44, 134, 102, 172, 48, 132, 110, 170, 26, 100, 108, 168,
 
  848          45, 135, 103, 173, 132, 50, 170, 114, 100, 28, 168, 112,
 
  849          134, 54, 172, 122, 49, 133, 111, 171, 108, 168, 32, 120,
 
  850          135, 55, 173, 123, 133, 51, 171, 115, 168, 112, 120, 34,
 
  851          102, 172, 8, 82, 110, 170, 12, 80, 27, 101, 109, 169,
 
  852          103, 173, 9, 83, 170, 114, 80, 14, 101, 29, 169, 113,
 
  853          172, 122, 82, 18, 111, 171, 13, 81, 109, 169, 33, 121,
 
  854          173, 123, 83, 19, 171, 115, 81, 15, 169, 113, 121, 35,
 
  856          64, 154, 138, 178, 66, 152, 142, 176, 56, 136, 140, 174,
 
  857          65, 155, 139, 179, 152, 68, 176, 146, 136, 58, 174, 144,
 
  858          154, 70, 178, 150, 67, 153, 143, 177, 140, 174, 60, 148,
 
  859          155, 71, 179, 151, 153, 69, 177, 147, 174, 144, 148, 62,
 
  860          138, 178, 36, 126, 142, 176, 38, 124, 57, 137, 141, 175,
 
  861          139, 179, 37, 127, 176, 146, 124, 40, 137, 59, 175, 145,
 
  862          178, 150, 126, 44, 143, 177, 39, 125, 141, 175, 61, 149,
 
  863          179, 151, 127, 45, 177, 147, 125, 41, 175, 145, 149, 63
 
  867        static const Index q_c[] =
 
  869          52, 92, 12, 88, 16, 84,
 
  870          53, 93, 13, 89, 84, 20,
 
  871          54, 94, 88, 28, 17, 85,
 
  872          55, 95, 89, 29, 85, 21,
 
  873          92, 0, 14, 90, 18, 86,
 
  874          93, 1, 15, 91, 86, 22,
 
  875          94, 2, 90, 30, 19, 87,
 
  876          95, 3, 91, 31, 87, 23,
 
  878          56, 104, 24, 100, 32, 96,
 
  879          57, 105, 25, 101, 96, 36,
 
  880          58, 106, 100, 44, 33, 97,
 
  881          59, 107, 101, 45, 97, 37,
 
  882          104, 4, 26, 102, 34, 98,
 
  883          105, 5, 27, 103, 98, 38,
 
  884          106, 6, 102, 46, 35, 99,
 
  885          107, 7, 103, 47, 99, 39,
 
  887          60, 116, 28, 112, 36, 108,
 
  888          61, 117, 29, 113, 108, 40,
 
  889          62, 118, 112, 48, 37, 109,
 
  890          63, 119, 113, 49, 109, 41,
 
  891          116, 8, 30, 114, 38, 110,
 
  892          117, 9, 31, 115, 110, 42,
 
  893          118, 10, 114, 50, 39, 111,
 
  894          119, 11, 115, 51, 111, 43,
 
  896          80, 128, 64, 124, 68, 120,
 
  897          81, 129, 65, 125, 120, 72,
 
  898          82, 130, 124, 76, 69, 121,
 
  899          83, 131, 125, 77, 121, 73,
 
  900          128, 52, 66, 126, 70, 122,
 
  901          129, 53, 67, 127, 122, 74,
 
  902          130, 54, 126, 78, 71, 123,
 
  903          131, 55, 127, 79, 123, 75
 
  907        if(!comp_vtx(mesh.get_vertex_set(), vtx))
 
  908          throw String(
"Vertex coordinate refinement failure");
 
  911        if(!comp_idx(mesh.get_index_set<1,0>(), v_e))
 
  912          throw String(
"Vertex-At-Edge index set refinement failure");
 
  915        if(!comp_idx(mesh.get_index_set<2,0>(), v_q))
 
  916          throw String(
"Vertex-At-Quad index set refinement failure");
 
  919        if(!comp_idx(mesh.get_index_set<3,0>(), v_c))
 
  920          throw String(
"Vertex-At-Cube index set refinement failure");
 
  923        if(!comp_idx(mesh.get_index_set<2,1>(), e_q))
 
  924          throw String(
"Edge-At-Quad index set refinement failure");
 
  927        if(!comp_idx(mesh.get_index_set<3,1>(), e_c))
 
  928          throw String(
"Edge-At-Cube index set refinement failure");
 
  931        if(!comp_idx(mesh.get_index_set<3,2>(), q_c))
 
  932          throw String(
"Quad-At-Cube index set refinement failure");
 
  936      HexaMesh* create_big_tetris_mesh_3d()
 
  938        Index num_entities[] =
 
  947        HexaMesh* mesh = 
new HexaMesh(num_entities);
 
 1040        copy_vtx(mesh->get_vertex_set(), vtx);
 
 1231        copy_idx(mesh->get_index_set<1,0>(), v_e);
 
 1371        copy_idx(mesh->get_index_set<2,0>(), v_q);
 
 1376          8, 38, 39, 69, 30, 59, 60, 77, 
 
 1377          38, 9, 69, 40, 59, 31, 77, 61,
 
 1378          39, 69, 11, 42, 60, 77, 33, 63,
 
 1379          69, 40, 42, 12, 77, 61, 63, 34,
 
 1380          30, 59, 60, 77, 0, 20, 21, 56,
 
 1381          59, 31, 77, 61, 20, 1, 56, 22,
 
 1382          60, 77, 33, 63, 21, 56, 3, 24,
 
 1383          77, 61, 63, 34, 56, 22, 24, 4,
 
 1384          10, 41, 43, 70, 32, 62, 64, 78,
 
 1385          41, 11, 70, 44, 62, 33, 78, 65,
 
 1386          43, 70, 13, 46, 64, 78, 35, 67, 
 
 1387          70, 44, 46, 14, 78, 65, 67, 36,
 
 1388          32, 62, 64, 78, 2, 23, 25, 57,
 
 1389          62, 33, 78, 65, 23, 3, 57, 26,
 
 1390          64, 78, 35, 67, 25, 57, 5, 28,
 
 1391          78, 65, 67, 36, 57, 26, 28, 6,
 
 1392          11, 42, 44, 71, 33, 63, 65, 79,
 
 1393          42, 12, 71, 45, 63, 34, 79, 66,
 
 1394          44, 71, 14, 47, 65, 79, 36, 68,
 
 1395          71, 45, 47, 15, 79, 66, 68, 37,
 
 1396          33, 63, 65, 79,3, 24, 26, 58, 
 
 1397          63, 34, 79, 66, 24, 4, 58, 27,
 
 1398          65, 79, 36, 68, 26, 58, 6, 29,
 
 1399          79, 66, 68, 37, 58, 27, 29, 7,
 
 1400          16, 52, 53, 76, 48, 72, 73, 80,
 
 1401          52, 17, 76, 54, 72, 49, 80, 74,
 
 1402          53, 76, 18, 55, 73, 80, 50, 75,
 
 1403          76, 54, 55, 19, 80, 74, 75, 51,
 
 1404          48, 72, 73, 80, 8, 38, 39, 69,
 
 1405          72, 49, 80, 74,38, 9, 69, 40,
 
 1406          73, 80, 50, 75, 39, 69, 11, 42, 
 
 1407          80, 74, 75, 51, 69, 40, 42, 12
 
 1409        copy_idx(mesh->get_index_set<3, 0>(), v_c);
 
 1415      HexaSubMesh* create_tetris_quad_submesh_3d()
 
 1447        Index num_entities[] =
 
 1456        HexaSubMesh* mesh = 
new HexaSubMesh(num_entities, 
true);
 
 1458        std::unique_ptr<HexaSubMesh::AttributeSetType> my_attrib_set(
new HexaSubMesh::AttributeSetType(num_entities[0],2));
 
 1460        mesh->add_attribute(std::move(my_attrib_set), 
"HexaSubAttributeSet");
 
 1474        copy_attr(*(mesh->find_attribute(
"HexaSubAttributeSet")), attr);
 
 1490        copy_idx(mesh->get_index_set<1,0>(), v_e);
 
 1499        copy_idx(mesh->get_index_set<2,0>(), v_q);
 
 1508        copy_idx(mesh->get_index_set<2,1>(), e_q);
 
 1513          6, 11, 9, 8, 12, 4, 3, 14
 
 1515        copy_trg(mesh->get_target_set<0>(), vti);
 
 1520          6, 4, 24, 22, 16, 13, 14, 19, 20, 18
 
 1522        copy_trg(mesh->get_target_set<1>(), eqi);
 
 1529        copy_trg(mesh->get_target_set<2>(), qti);
 
 1534      void validate_refined_tetris_quad_submesh_3d(
const HexaSubMesh& mesh)
 
 1537        if(mesh.get_num_entities(0) != 21)
 
 1538          throw String(
"Vertex count mismatch");
 
 1539        if(mesh.get_num_entities(1) != 32)
 
 1540          throw String(
"Edge count mismatch");
 
 1541        if(mesh.get_num_entities(2) != 12)
 
 1542          throw String(
"Quad count mismatch");
 
 1570        if(!comp_attr(*(mesh.find_attribute(
"HexaSubAttributeSet")), attr))
 
 1571          throw String(
"Attribute refinement failure");
 
 1609        if(!comp_idx(mesh.get_index_set<1,0>(), v_e))
 
 1610          throw String(
"Vertex-At-Edge index set refinement failure");
 
 1628        if(!comp_idx(mesh.get_index_set<2,0>(), v_q))
 
 1629          throw String(
"Vertex-At-Quad index set refinement failure");
 
 1647        if(!comp_idx(mesh.get_index_set<2,1>(), e_q))
 
 1648          throw String(
"Edges-At-Quad refinement failure");
 
 1653          6, 11, 9, 8, 12, 4, 3, 14,
 
 1654          26, 24, 44, 42, 36, 33, 34,
 
 1655          39, 40, 38, 65, 63, 69
 
 1657        if(!comp_trg(mesh.get_target_set<0>(), vti))
 
 1658          throw String(
"Vertex-Target-Indices refinement failure");
 
 1663          12, 13, 9, 8, 49, 48, 44, 45,
 
 1664          33, 32, 27, 26, 28, 29, 38, 39,
 
 1665          40, 41, 36, 37, 109, 108, 111, 110,
 
 1666          103, 102, 101, 100, 124, 125, 126, 127
 
 1668        if(!comp_trg(mesh.get_target_set<1>(), eti))
 
 1669          throw String(
"Edge-Target-Indices refinement failure");
 
 1678        if(!comp_trg(mesh.get_target_set<2>(), qti))
 
 1679          throw String(
"Quad-Target-Indices refinement failure");
 
double Real
Real data type.
std::uint64_t Index
Index data type.