| 55 | } |
| 56 | |
| 57 | void TetrahedronElements::check_mesh() { |
| 58 | if (m_mesh->get_dim() != 3) { |
| 59 | throw RuntimeError("Tetrahedron mesh must be in R^3."); |
| 60 | } |
| 61 | if (m_mesh->get_num_voxels() == 0) { |
| 62 | throw RuntimeError("Mesh contains zero elements."); |
| 63 | } |
| 64 | if (m_mesh->get_vertex_per_voxel() != 4) { |
| 65 | throw RuntimeError("Mesh is not a tetrahedron mesh."); |
| 66 | } |
| 67 | if (!m_mesh->has_attribute("voxel_volume")) { |
| 68 | m_mesh->add_attribute("voxel_volume"); |
| 69 | } |
| 70 | } |
nothing calls this directly
no test coverage detected