MCPcopy Create free account
hub / github.com/PyMesh/PyMesh / check_mesh

Method check_mesh

tools/Assembler/Elements/TetrahedronElements.cpp:57–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57void 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}

Callers

nothing calls this directly

Calls 6

RuntimeErrorClass · 0.85
get_dimMethod · 0.45
get_num_voxelsMethod · 0.45
get_vertex_per_voxelMethod · 0.45
has_attributeMethod · 0.45
add_attributeMethod · 0.45

Tested by

no test coverage detected