1 #include <gtest/gtest.h> 3 #include <Unittests/unittests_common.hh> 9 generateHexahedralMesh(mesh_);
13 EXPECT_TRUE(hv_it.valid());
15 EXPECT_HANDLE_EQ(VertexHandle(0), *hv_it); ++hv_it;
16 EXPECT_HANDLE_EQ(VertexHandle(1), *hv_it); ++hv_it;
17 EXPECT_HANDLE_EQ(VertexHandle(2), *hv_it); ++hv_it;
18 EXPECT_HANDLE_EQ(VertexHandle(3), *hv_it); ++hv_it;
19 EXPECT_HANDLE_EQ(VertexHandle(4), *hv_it); ++hv_it;
20 EXPECT_HANDLE_EQ(VertexHandle(7), *hv_it); ++hv_it;
21 EXPECT_HANDLE_EQ(VertexHandle(6), *hv_it); ++hv_it;
22 EXPECT_HANDLE_EQ(VertexHandle(5), *hv_it);
27 generateTetrahedralMesh(mesh_);
33 EXPECT_TRUE(vv_it.valid());
35 std::set<VertexHandle> onering;
41 onering.insert(*vv_it);
46 EXPECT_EQ(3, valence);
49 EXPECT_EQ(3u, onering.size());
52 EXPECT_EQ(onering.end(), std::find(onering.begin(), onering.end(), VertexHandle(-1)));
56 #if __cplusplus >= 201103L || _MSC_VER >= 1800 // C++11 59 std::set<VertexHandle> onering;
62 for (
auto vh : mesh_.vertex_vertices(VertexHandle(0)))
69 EXPECT_EQ(3, valence);
72 EXPECT_EQ(3u, onering.size());
75 EXPECT_EQ(onering.end(), std::find(onering.begin(), onering.end(), VertexHandle(-1)));
84 generateTetrahedralMesh(mesh_);
90 EXPECT_TRUE(vf_it.valid());
92 std::set<FaceHandle> incident_faces;
98 incident_faces.insert(*vf_it);
103 EXPECT_EQ(3, valence);
106 EXPECT_EQ(3u, incident_faces.size());
109 EXPECT_EQ(incident_faces.end(), std::find(incident_faces.begin(), incident_faces.end(), FaceHandle(-1)));
113 #if __cplusplus >= 201103L || _MSC_VER >= 1800 // C++11 116 std::set<VertexHandle> onering;
119 for (
auto vh : mesh_.vertex_vertices(VertexHandle(0)))
126 EXPECT_EQ(3, valence);
129 EXPECT_EQ(3u, onering.size());
132 EXPECT_EQ(onering.end(), std::find(onering.begin(), onering.end(), VertexHandle(-1)));
139 #if __cplusplus >= 201103L || _MSC_VER >= 1800 // C++11 142 generateHexahedralMesh(mesh_);
144 for (
const auto& vh: mesh_.vertices()) { _dummy = vh;}
145 const auto& constref = mesh_;
146 for (
const auto& vh: constref.vertices()) { _dummy = vh;}
Iterate over all vertices of a hexahedron in a specific order.