1 #include "unittests_common.hh" 8 generateHexahedralMesh(mesh_);
12 EXPECT_TRUE(hv_it.valid());
14 EXPECT_HANDLE_EQ(VertexHandle(0), *hv_it); ++hv_it;
15 EXPECT_HANDLE_EQ(VertexHandle(1), *hv_it); ++hv_it;
16 EXPECT_HANDLE_EQ(VertexHandle(2), *hv_it); ++hv_it;
17 EXPECT_HANDLE_EQ(VertexHandle(3), *hv_it); ++hv_it;
18 EXPECT_HANDLE_EQ(VertexHandle(4), *hv_it); ++hv_it;
19 EXPECT_HANDLE_EQ(VertexHandle(7), *hv_it); ++hv_it;
20 EXPECT_HANDLE_EQ(VertexHandle(6), *hv_it); ++hv_it;
21 EXPECT_HANDLE_EQ(VertexHandle(5), *hv_it);
26 generateTetrahedralMesh(mesh_);
32 EXPECT_TRUE(vv_it.valid());
34 std::set<VertexHandle> onering;
40 onering.insert(*vv_it);
45 EXPECT_EQ(3, valence);
48 EXPECT_EQ(3u, onering.size());
51 EXPECT_EQ(onering.end(), std::find(onering.begin(), onering.end(), VertexHandle(-1)));
55 #if __cplusplus >= 201103L || _MSC_VER >= 1800 // C++11 58 std::set<VertexHandle> onering;
61 for (
auto vh : mesh_.vertex_vertices(VertexHandle(0)))
68 EXPECT_EQ(3, valence);
71 EXPECT_EQ(3u, onering.size());
74 EXPECT_EQ(onering.end(), std::find(onering.begin(), onering.end(), VertexHandle(-1)));
83 generateTetrahedralMesh(mesh_);
89 EXPECT_TRUE(vf_it.valid());
91 std::set<FaceHandle> incident_faces;
97 incident_faces.insert(*vf_it);
102 EXPECT_EQ(3, valence);
105 EXPECT_EQ(3u, incident_faces.size());
108 EXPECT_EQ(incident_faces.end(), std::find(incident_faces.begin(), incident_faces.end(), FaceHandle(-1)));
112 #if __cplusplus >= 201103L || _MSC_VER >= 1800 // C++11 115 std::set<VertexHandle> onering;
118 for (
auto vh : mesh_.vertex_vertices(VertexHandle(0)))
125 EXPECT_EQ(3, valence);
128 EXPECT_EQ(3u, onering.size());
131 EXPECT_EQ(onering.end(), std::find(onering.begin(), onering.end(), VertexHandle(-1)));
138 #if __cplusplus >= 201103L || _MSC_VER >= 1800 // C++11 141 generateHexahedralMesh(mesh_);
143 for (
const auto& vh: mesh_.vertices()) { _dummy = vh;}
144 const auto& constref = mesh_;
145 for (
const auto& vh: constref.vertices()) { _dummy = vh;}
Iterate over all vertices of a hexahedron in a specific order.