6#include <kernel/geometry/test_aux/standard_tetra.hpp> 
    7#include <kernel/geometry/test_aux/copy_comp_set.hpp> 
   15      TetraMesh* create_tetra_mesh_3d(
int orientation)
 
   18        Index num_entities[] =
 
   27        TetraMesh* mesh = 
new TetraMesh(num_entities);
 
   32        static const Real vtx0[3*4] =
 
   41        static const Index v_e0[6*2] =
 
   52        static const Index v_t0[4*3] =
 
   61        static const Index v_s0[1*4] =
 
   67        static const Index e_t0[3*4] =
 
   76        static const Index e_s0[1*6] =
 
   82        static const Index t_s0[1*4] =
 
  127        static const Real vtx1[3*4] =
 
  136        static const Index v_e1[6*2] =
 
  147        static const Index v_t1[4*3] =
 
  156        static const Index v_s1[1*4] =
 
  162        static const Index e_t1[3*4] =
 
  171        static const Index e_s1[1*6] =
 
  177        static const Index t_s1[1*4] =
 
  221        static const Real vtx2[3*4] =
 
  230        static const Index v_e2[6*2] =
 
  241        static const Index v_t2[4*3] =
 
  250        static const Index v_s2[1*4] =
 
  256        static const Index e_t2[3*4] =
 
  265        static const Index e_s2[1*6] =
 
  271        static const Index t_s2[1*4] =
 
  279            copy_vtx(mesh->get_vertex_set(), vtx0);
 
  280            copy_idx(mesh->get_index_set<1,0>(), v_e0);
 
  281            copy_idx(mesh->get_index_set<2,0>(), v_t0);
 
  282            copy_idx(mesh->get_index_set<2,1>(), e_t0);
 
  283            copy_idx(mesh->get_index_set<3,0>(), v_s0);
 
  284            copy_idx(mesh->get_index_set<3,1>(), e_s0);
 
  285            copy_idx(mesh->get_index_set<3,2>(), t_s0);
 
  289            copy_vtx(mesh->get_vertex_set(), vtx1);
 
  290            copy_idx(mesh->get_index_set<1,0>(), v_e1);
 
  291            copy_idx(mesh->get_index_set<2,0>(), v_t1);
 
  292            copy_idx(mesh->get_index_set<2,1>(), e_t1);
 
  293            copy_idx(mesh->get_index_set<3,0>(), v_s1);
 
  294            copy_idx(mesh->get_index_set<3,1>(), e_s1);
 
  295            copy_idx(mesh->get_index_set<3,2>(), t_s1);
 
  299            copy_vtx(mesh->get_vertex_set(), vtx2);
 
  300            copy_idx(mesh->get_index_set<1,0>(), v_e2);
 
  301            copy_idx(mesh->get_index_set<2,0>(), v_t2);
 
  302            copy_idx(mesh->get_index_set<2,1>(), e_t2);
 
  303            copy_idx(mesh->get_index_set<3,0>(), v_s2);
 
  304            copy_idx(mesh->get_index_set<3,1>(), e_s2);
 
  305            copy_idx(mesh->get_index_set<3,2>(), t_s2);
 
  315      void validate_refined_tetra_mesh_3d(
const TetraMesh& mesh, 
int orientation)
 
  319        if(mesh.get_num_entities(0) != 11)
 
  320          throw String(
"Vertex count mismatch");
 
  321        if(mesh.get_num_entities(1) != 30)
 
  322          throw String(
"Edge count mismatch");
 
  323        if(mesh.get_num_entities(2) != 32)
 
  324          throw String(
"Triangle count mismatch");
 
  325        if(mesh.get_num_entities(3) != 12)
 
  326          throw String(
"Triangle count mismatch");
 
  332        static const Real vtx0[] =
 
  348        static const Index v_e0[] =
 
  388        static const Index v_t0[] =
 
  426        static const Index v_s0[] =
 
  445        static const Index e_t0[] =
 
  493        static const Index e_s0[] =
 
  497          21, 18, 24, 15, 25, 26,
 
  500          19, 22, 24, 12, 28, 27,
 
  502          16, 23, 3, 13, 10, 7,
 
  503          23, 16, 25, 13, 27, 29,
 
  505          20, 17, 5, 14, 9, 11,
 
  506          17, 20, 26, 14, 29, 28,
 
  509          12, 13, 27, 14, 28, 29,
 
  510          16, 15, 25, 17, 29, 26,
 
  511          18, 19, 24, 20, 26, 28,
 
  512          22, 21, 24, 23, 27, 25,
 
  516        static const Index t_s0[] =
 
  540        static const Real vtx1[] =
 
  558        static const Index v_e1[] =
 
  601        static const Index v_t1[] =
 
  649        static const Index v_s1[] =
 
  667        static const Index e_t1[] =
 
  715        static const Index e_s1[] =
 
  719          14, 21, 24, 19, 25, 26,
 
  721          23, 13, 24, 17, 28, 27,
 
  722          20, 12, 1, 15, 11, 3,
 
  723          12, 20, 25, 15, 27, 29,
 
  724          22, 18, 8, 16, 6, 10,
 
  725          18, 22, 26, 16, 29, 28,
 
  728          17, 15, 27, 16, 28, 29,
 
  729          20, 19, 25, 18, 29, 26,
 
  730          21, 23, 24, 22, 26, 28,
 
  731          13, 14, 24, 12, 27, 25
 
  735        static const Index t_s1[] =
 
  758        static const Real vtx2[] =
 
  776        static const Index v_e2[] =
 
  819        static const Index v_t2[] =
 
  867        static const Index v_s2[] =
 
  885        static const Index e_t2[] =
 
  933        static const Index e_s2[] =
 
  937          17, 23, 24, 13, 25, 26,
 
  939          22, 16, 24, 19, 28, 27,
 
  940          12, 15, 9, 18, 10, 5,
 
  941          15, 12, 25, 18, 27, 29,
 
  942          21, 14, 0, 20, 6, 11,
 
  943          14, 21, 26, 20, 29, 28,
 
  947          19, 18, 27, 20, 28, 29,
 
  948          12, 13, 25, 14, 29, 26,
 
  949          23, 22, 24, 21, 26, 28,
 
  950          16, 17, 24, 15, 27, 25
 
  954        static const Index t_s2[] =
 
  981            if(!comp_vtx(mesh.get_vertex_set(), vtx0))
 
  982              throw String(
"Vertex coordinate refinement failure");
 
  985            if(!comp_idx(mesh.get_index_set<1,0>(), v_e0))
 
  986              throw String(
"Vertex-At-Edge index set refinement failure");
 
  989            if(!comp_idx(mesh.get_index_set<2,0>(), v_t0))
 
  990              throw String(
"Vertex-At-Triangle index set refinement failure");
 
  993            if(!comp_idx(mesh.get_index_set<3,0>(), v_s0))
 
  994              throw String(
"Vertex-At-Tetrahedron index set refinement failure");
 
  997            if(!comp_idx(mesh.get_index_set<2,1>(), e_t0))
 
  998              throw String(
"Edge-At-Triangle index set refinement failure");
 
 1001            if(!comp_idx(mesh.get_index_set<3,1>(), e_s0))
 
 1002              throw String(
"Edge-At-Tetrahedron index set refinement failure");
 
 1005            if(!comp_idx(mesh.get_index_set<3,2>(), t_s0))
 
 1006              throw String(
"Triangle-At-Tetrahedron index set refinement failure");
 
 1011            if(!comp_vtx(mesh.get_vertex_set(), vtx1))
 
 1012              throw String(
"Vertex coordinate refinement failure");
 
 1015            if(!comp_idx(mesh.get_index_set<1,0>(), v_e1))
 
 1016              throw String(
"Vertex-At-Edge index set refinement failure");
 
 1019            if(!comp_idx(mesh.get_index_set<2,0>(), v_t1))
 
 1020              throw String(
"Vertex-At-Triangle index set refinement failure");
 
 1023            if(!comp_idx(mesh.get_index_set<3,0>(), v_s1))
 
 1024              throw String(
"Vertex-At-Tetrahedron index set refinement failure");
 
 1027            if(!comp_idx(mesh.get_index_set<2,1>(), e_t1))
 
 1028              throw String(
"Edge-At-Triangle index set refinement failure");
 
 1031            if(!comp_idx(mesh.get_index_set<3,1>(), e_s1))
 
 1032              throw String(
"Edge-At-Tetrahedron index set refinement failure");
 
 1035            if(!comp_idx(mesh.get_index_set<3,2>(), t_s1))
 
 1036              throw String(
"Triangle-At-Tetrahedron index set refinement failure");
 
 1041            if(!comp_vtx(mesh.get_vertex_set(), vtx2))
 
 1042              throw String(
"Vertex coordinate refinement failure");
 
 1045            if(!comp_idx(mesh.get_index_set<1,0>(), v_e2))
 
 1046              throw String(
"Vertex-At-Edge index set refinement failure");
 
 1049            if(!comp_idx(mesh.get_index_set<2,0>(), v_t2))
 
 1050              throw String(
"Vertex-At-Triangle index set refinement failure");
 
 1053            if(!comp_idx(mesh.get_index_set<3,0>(), v_s2))
 
 1054              throw String(
"Vertex-At-Tetrahedron index set refinement failure");
 
 1057            if(!comp_idx(mesh.get_index_set<2,1>(), e_t2))
 
 1058              throw String(
"Edge-At-Triangle index set refinement failure");
 
 1061            if(!comp_idx(mesh.get_index_set<3,1>(), e_s2))
 
 1062              throw String(
"Edge-At-Tetrahedron index set refinement failure");
 
 1065            if(!comp_idx(mesh.get_index_set<3,2>(), t_s2))
 
 1066              throw String(
"Triangle-At-Tetrahedron index set refinement failure");
 
 1074      TetraMesh* create_big_tetra_mesh_3d()
 
 1077        Index num_entities[] =
 
 1086        TetraMesh* mesh = 
new TetraMesh(num_entities);
 
 1089        static const Real vtx0[3*5] =
 
 1099        static const Index v_e0[10*2] =
 
 1114        static const Index v_t0[9*3] =
 
 1128        static const Index v_s0[3*4] =
 
 1136        static const Index e_t0[3*9] =
 
 1150        static const Index e_s0[3*6] =
 
 1158        static const Index t_s0[3*4] =
 
 1165        copy_vtx(mesh->get_vertex_set(), vtx0);
 
 1166        copy_idx(mesh->get_index_set<1,0>(), v_e0);
 
 1167        copy_idx(mesh->get_index_set<2,0>(), v_t0);
 
 1168        copy_idx(mesh->get_index_set<2,1>(), e_t0);
 
 1169        copy_idx(mesh->get_index_set<3,0>(), v_s0);
 
 1170        copy_idx(mesh->get_index_set<3,1>(), e_s0);
 
 1171        copy_idx(mesh->get_index_set<3,2>(), t_s0);
 
 1177      void validate_refined_big_tetra_mesh_3d(
const TetraMesh& mesh)
 
 1181        if(mesh.get_num_entities(0) != 18)
 
 1182          throw String(
"Vertex count mismatch");
 
 1183        if(mesh.get_num_entities(1) != 65)
 
 1184          throw String(
"Edge count mismatch");
 
 1185        if(mesh.get_num_entities(2) != 84)
 
 1186          throw String(
"Triangle count mismatch");
 
 1187        if(mesh.get_num_entities(3) != 36)
 
 1188          throw String(
"Triangle count mismatch");
 
 1191        static const Real vtx0[] =
 
 1216        static const Index v_e0[] =
 
 1301        static const Index v_t0[] =
 
 1406        static const Index v_s0[] =
 
 1452        static const Index e_t0[] =
 
 1557        static const Index e_s0[] =
 
 1560          39, 27, 14, 44, 2, 9,
 
 1561          27, 39, 47, 44, 48, 49,
 
 1562          26, 38, 15, 20, 11, 4,
 
 1563          38, 26, 47, 20, 51, 50,
 
 1564          46, 28, 8, 22, 0, 10,
 
 1565          28, 46, 48, 22, 50, 52,
 
 1566          40, 45, 3, 21, 5, 1,
 
 1567          45, 40, 49, 21, 52, 51,
 
 1569          20, 22, 50, 21, 51, 52,
 
 1570          46, 44, 48, 45, 52, 49,
 
 1571          39, 38, 47, 40, 49, 51,
 
 1572          26, 27, 47, 28, 50, 48,
 
 1574          24, 41, 13, 33, 17, 6,
 
 1575          41, 24, 53, 33, 54, 55,
 
 1576          42, 25, 12, 22, 0, 10,
 
 1577          25, 42, 53, 22, 57, 56,
 
 1578          34, 43, 7, 21, 5, 1,
 
 1579          43, 34, 54, 21, 56, 58,
 
 1580          23, 32, 16, 20, 11, 4,
 
 1581          32, 23, 55, 20, 58, 57,
 
 1584          22, 21, 56, 20, 57, 58,
 
 1585          34, 33, 54, 32, 58, 55,
 
 1586          24, 25, 53, 23, 55, 57,
 
 1587          42, 41, 53, 43, 56, 54,
 
 1589          41, 31, 13, 35, 6, 18,
 
 1590          31, 41, 59, 35, 60, 61,
 
 1591          29, 42, 12, 46, 8, 0,
 
 1592          42, 29, 59, 46, 63, 62,
 
 1593          36, 30, 19, 44, 2, 9,
 
 1594          30, 36, 60, 44, 62, 64,
 
 1595          43, 37, 7, 45, 1, 3,
 
 1596          37, 43, 61, 45, 64, 63,
 
 1598          46, 44, 62, 45, 63, 64,
 
 1599          36, 35, 60, 37, 64, 61,
 
 1600          41, 42, 59, 43, 61, 63,
 
 1601          29, 31, 59, 30, 62, 60
 
 1605        static const Index t_s0[] =
 
 1651        if(!comp_vtx(mesh.get_vertex_set(), vtx0))
 
 1652          throw String(
"Vertex coordinate refinement failure");
 
 1655        if(!comp_idx(mesh.get_index_set<1,0>(), v_e0))
 
 1656          throw String(
"Vertex-At-Edge index set refinement failure");
 
 1659        if(!comp_idx(mesh.get_index_set<2,0>(), v_t0))
 
 1660          throw String(
"Vertex-At-Triangle index set refinement failure");
 
 1663        if(!comp_idx(mesh.get_index_set<3,0>(), v_s0))
 
 1664          throw String(
"Vertex-At-Tetrahedron index set refinement failure");
 
 1667        if(!comp_idx(mesh.get_index_set<2,1>(), e_t0))
 
 1668          throw String(
"Edge-At-Triangle index set refinement failure");
 
 1671        if(!comp_idx(mesh.get_index_set<3,1>(), e_s0))
 
 1672          throw String(
"Edge-At-Tetrahedron index set refinement failure");
 
 1675        if(!comp_idx(mesh.get_index_set<3,2>(), t_s0))
 
 1676          throw String(
"Triangle-At-Tetrahedron index set refinement failure");
 
 1680      TetraMesh* create_really_big_tetra_mesh_3d()
 
 1683        Index num_entities[] =
 
 1692        TetraMesh* mesh = 
new TetraMesh(num_entities);
 
 1695        static const Real vtx0[3*18] =
 
 1720        static const Index v_e0[65*2] =
 
 1805        static const Index v_t0[84*3] =
 
 1910        static const Index v_s0[36*4] =
 
 1955        copy_vtx(mesh->get_vertex_set(), vtx0);
 
 1956        copy_idx(mesh->get_index_set<1,0>(), v_e0);
 
 1957        copy_idx(mesh->get_index_set<2,0>(), v_t0);
 
 1958        copy_idx(mesh->get_index_set<3,0>(), v_s0);
 
 1964      TetraSubMesh* create_tria_submesh_3d()
 
 1967        Index num_entities[] =
 
 1976        TetraSubMesh* mesh = 
new TetraSubMesh(num_entities, 
true);
 
 1978        std::unique_ptr<TetraSubMesh::AttributeSetType> my_attrib_set(
new TetraSubMesh::AttributeSetType(num_entities[0], 2));
 
 1980        mesh->add_attribute(std::move(my_attrib_set), 
"TriaSubAttributeSet");
 
 1990        copy_attr(*(mesh->find_attribute(
"TriaSubAttributeSet")), attr);
 
 2002        copy_idx(mesh->get_index_set<1,0>(), v_e);
 
 2011        copy_idx(mesh->get_index_set<2,0>(), v_t);
 
 2020        copy_idx(mesh->get_index_set<2,1>(), e_t);
 
 2027        copy_trg(mesh->get_target_set<0>(), vti);
 
 2034        copy_trg(mesh->get_target_set<1>(), eqi);
 
 2041        copy_trg(mesh->get_target_set<2>(), tti);
 
 2046      void validate_refined_tria_submesh_3d(
const TetraSubMesh& mesh)
 
 2050        if(mesh.get_num_entities(0) != 10)
 
 2051          throw String(
"Vertex count mismatch");
 
 2052        if(mesh.get_num_entities(1) != 21)
 
 2053          throw String(
"Edge count mismatch");
 
 2054        if(mesh.get_num_entities(2) != 12)
 
 2055          throw String(
"Triangle count mismatch");
 
 2072        if(!comp_attr(*(mesh.find_attribute(
"TriaSubAttributeSet")), attr))
 
 2073          throw String(
"Attribute refinement failure");
 
 2100        if(!comp_idx(mesh.get_index_set<1,0>(), v_e))
 
 2101          throw String(
"Vertex-At-Edge index set refinement failure");
 
 2119        if(!comp_idx(mesh.get_index_set<2,0>(), v_t))
 
 2120          throw String(
"Vertex-At-Triangle index set refinement failure");
 
 2138        if(!comp_idx(mesh.get_index_set<2,1>(), e_t))
 
 2139          throw String(
"Edges-At-Triangle refinement failure");
 
 2144          4, 0, 3, 2, 14, 8, 11, 5, 9, 6
 
 2146        if(!comp_trg(mesh.get_target_set<0>(), vti))
 
 2147          throw String(
"Vertex-Target-Indices refinement failure");
 
 2152          18, 19, 6, 7, 12, 13, 1, 0, 8, 9, 2, 3,
 
 2153          37, 35, 36, 46, 44, 45, 42, 43, 41
 
 2155        if(!comp_trg(mesh.get_target_set<1>(), eti))
 
 2156          throw String(
"Edge-Target-Indices refinement failure");
 
 2165        if(!comp_trg(mesh.get_target_set<2>(), tti))
 
 2166          throw String(
"Triangle-Target-Indices refinement failure");
 
#define XABORTM(msg)
Abortion macro definition with custom message.
double Real
Real data type.
String stringify(const T_ &item)
Converts an item into a String.
std::uint64_t Index
Index data type.