| 21 | } |
| 22 | |
| 23 | void ParameterDerivative::initialize_mesh() { |
| 24 | assert(m_mesh->get_vertex_per_face() == 3); |
| 25 | if (!m_mesh->has_attribute("face_voronoi_area")) { |
| 26 | m_mesh->add_attribute("face_voronoi_area"); |
| 27 | } |
| 28 | |
| 29 | if (!m_mesh->has_attribute("face_source")) { |
| 30 | throw RuntimeError("Mesh does not have face source attribute"); |
| 31 | } |
| 32 | m_face_source = m_mesh->get_attribute("face_source").cast<int>(); |
| 33 | } |
| 34 | |
| 35 | void ParameterDerivative::initialize_normals() { |
| 36 | const size_t dim = m_mesh->get_dim(); |
nothing calls this directly
no test coverage detected