| 7 | }; |
| 8 | |
| 9 | TEST_F(VoxelInradiusAttributeTest, tet) { |
| 10 | MeshPtr mesh = load_mesh("tet.msh"); |
| 11 | mesh->add_attribute("voxel_inradius"); |
| 12 | ASSERT_TRUE(mesh->has_attribute("voxel_inradius")); |
| 13 | VectorF inradius = mesh->get_attribute("voxel_inradius"); |
| 14 | ASSERT_EQ(1, inradius.size()); |
| 15 | |
| 16 | mesh->add_attribute("voxel_volume"); |
| 17 | VectorF volume = mesh->get_attribute("voxel_volume"); |
| 18 | ASSERT_EQ(1, volume.size()); |
| 19 | |
| 20 | mesh->add_attribute("face_area"); |
| 21 | VectorF area = mesh->get_attribute("face_area"); |
| 22 | ASSERT_EQ(4, area.size()); |
| 23 | |
| 24 | ASSERT_FLOAT_EQ(volume[0], area.sum() * inradius[0] / 3.0); |
| 25 | } |
nothing calls this directly
no test coverage detected