40 const unsigned NUMVTX = 27;
41 const unsigned NUMHEX = 8;
44 const double vertex_coords[3 * NUMVTX] = {
45 0, 0, 0, 1, 0, 0, 2, 0, 0, 0, 1, 0, 1, 1, 0, 2, 1, 0, 0, 2, 0, 1, 2, 0, 2, 2, 0,
47 0, 0, 1, 1, 0, 1, 2, 0, 1, 0, 1, 1, 1, 1, 1, 2, 1, 1, 0, 2, 1, 1, 2, 1, 2, 2, 1,
49 0, 0, 2, 1, 0, 2, 2, 0, 2, 0, 1, 2, 1, 1, 2, 2, 1, 2, 0, 2, 2, 1, 2, 2, 2, 2, 2 };
68 std::cout <<
"Created 27 vertex entities:" << vertex_handles;
81 moab::EntityHandle conn[NUMHEX][8] = { { 0, 1, 4, 3, 9, 10, 13, 12 }, { 1, 2, 5, 4, 10, 11, 14, 13 },
82 { 3, 4, 7, 6, 12, 13, 16, 15 }, { 4, 5, 8, 7, 13, 14, 17, 16 },
83 { 9, 10, 13, 12, 18, 19, 22, 21 }, { 10, 11, 14, 13, 19, 20, 23, 22 },
84 { 12, 13, 16, 15, 21, 22, 25, 24 }, { 13, 14, 17, 16, 22, 23, 26, 25 } };
91 for(
unsigned i = 0; i < NUMHEX; ++i )
93 for(
unsigned j = 0; j < 8; ++j )
98 conn[i][j] = conn[i][j] + first_vertex_handle;
108 for(
unsigned i = 0; i < NUMHEX; ++i )
112 hexahedron_handles.
insert( element );
116 std::cout <<
"Created HEX8 entities: " << hexahedron_handles;