(mesh)
| 171 | mesh.set_attribute("cell", cell_ids); |
| 172 | |
| 173 | def solve_heat_equation(mesh): |
| 174 | cell_ids = mesh.get_attribute("cell").ravel().astype(int); |
| 175 | cut_mesh = pymesh.cut_mesh(mesh, cell_ids); |
| 176 | |
| 177 | tree = pymesh.AABBTree2(); |
| 178 | tree.load_data(cut_mesh.vertices, cut_mesh.boundary_edges); |
| 179 | sq_dist, indices = tree.look_up(mesh.vertices); |
| 180 | |
| 181 | mesh.add_attribute("sq_dist"); |
| 182 | mesh.set_attribute("sq_dist", sq_dist); |
| 183 | |
| 184 | return mesh; |
| 185 | |
| 186 | def main(): |
| 187 | args = parse_args(); |
no test coverage detected