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

Function solve_heat_equation

scripts/svg_to_mesh.py:173–184  ·  view source on GitHub ↗
(mesh)

Source from the content-addressed store, hash-verified

171 mesh.set_attribute("cell", cell_ids);
172
173def 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
186def main():
187 args = parse_args();

Callers 1

mainFunction · 0.85

Calls 6

load_dataMethod · 0.95
look_upMethod · 0.95
AABBTree2Method · 0.80
get_attributeMethod · 0.45
add_attributeMethod · 0.45
set_attributeMethod · 0.45

Tested by

no test coverage detected