37TEST_CASE(
"regular_space_component_tri",
"[components][regular_space][trimesh][2D][scheduler]")
39 const int64_t tag_value = 1;
40 tests::DEBUG_TriMesh m = wmtk::tests::hex_plus_two_with_position();
48 std::vector<wmtk::attribute::MeshAttributeHandle> label_attributes;
49 label_attributes.emplace_back(face_tag_handle);
50 label_attributes.emplace_back(edge_tag_handle);
51 label_attributes.emplace_back(vertex_tag_handle);
53 std::vector<int64_t> label_values = {tag_value, tag_value, tag_value};
55 std::vector<attribute::MeshAttributeHandle> pass_through_attributes;
56 pass_through_attributes.emplace_back(
57 m.get_attribute_handle<
double>(
"vertices", PrimitiveType::Vertex));
59 SECTION(
"points_in_2d_case")
81 pass_through_attributes);
84 CHECK(m.get_all(PrimitiveType::Vertex).size() == 15);
88 data_dir /
"regular_space_result_0d_case",
98 SECTION(
"edges_in_2d_case")
118 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(4, 5, 2)) = tag_value;
119 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(5, 1, 2)) = tag_value;
120 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(1, 4, 2)) = tag_value;
121 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(7, 4, 5)) = tag_value;
122 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(7, 3, 5)) = tag_value;
129 pass_through_attributes);
132 CHECK(m.get_all(PrimitiveType::Triangle).size() == 17);
133 CHECK(m.get_all(PrimitiveType::Vertex).size() == 15);
137 data_dir /
"regular_space_result_1d_case",
149TEST_CASE(
"regular_space_component_tet",
"[components][regular_space][tetmesh][3D][scheduler][.]")
151 using namespace tests_3d;
164 DEBUG_TetMesh m = six_cycle_tets();
165 const int64_t tag_value = 1;
166 Eigen::MatrixXd V(8, 3);
167 V.row(0) << 0.5, 0.86, 0;
169 V.row(2) << 1.0, 0, 1.0;
170 V.row(3) << 1.0, 0, -1.0;
171 V.row(4) << 1.5, 0.86, 0;
173 V.row(6) << 0.5, -0.86, 0;
174 V.row(7) << 1.5, -0.86, 0;
180 std::vector<wmtk::attribute::MeshAttributeHandle> label_attributes;
181 label_attributes.emplace_back(edge_tag_handle);
182 label_attributes.emplace_back(vertex_tag_handle);
184 std::vector<int64_t> label_values = {tag_value, tag_value};
186 std::vector<attribute::MeshAttributeHandle> pass_through_attributes;
187 pass_through_attributes.emplace_back(
188 m.get_attribute_handle<
double>(
"vertices", PrimitiveType::Vertex));
190 SECTION(
"points_in_3d_case")
203 pass_through_attributes);
210 data_dir /
"regular_space_result_points_3d_case",
220 SECTION(
"edges_in_3d_case")
232 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(0, 1, 0)) = tag_value;
233 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(0, 2, 0)) = tag_value;
234 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(0, 3, 0)) = tag_value;
235 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(1, 2, 0)) = tag_value;
236 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(2, 3, 0)) = tag_value;
237 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(3, 1, 0)) = tag_value;
238 acc_edge_tag.
scalar_attribute(m.edge_tuple_with_vs_and_t(2, 5, 2)) = tag_value;
244 pass_through_attributes);
251 data_dir /
"regular_space_result_edges_3d_case",