create_mesh¶
- mfai.pytorch.models.nlam.create_mesh.build_graph_for_grid(grid_xy, cache_dir_path, plot=False, levels=None, hierarchical=False)[source]¶
xy: (x, y) coordinates of grid points, shape (2, N_x, N_y). plot: If graphs should be plotted during generation (default: False). levels: Limit multi-scale mesh to given number of levels, from bottom up (default: None (no limit)). hierarchical: Generate hierarchical mesh graph (default: 0, no).
- mfai.pytorch.models.nlam.create_mesh.from_networkx_with_start_index(nx_graph, start_index)[source]¶
- Return type:
Data- Parameters:
nx_graph (Graph | DiGraph)
start_index (int)
- mfai.pytorch.models.nlam.create_mesh.grid2mesh(G_bottom_mesh, all_mesh_nodes, xy, plot, cache_dir_path)[source]¶
- mfai.pytorch.models.nlam.create_mesh.hierarchical_mesh(G, mesh_levels, plot, cache_dir_path)[source]¶
- mfai.pytorch.models.nlam.create_mesh.mesh2grid(G_g2m, vm, vm_xy, vg_list, plot, cache_dir_path)[source]¶
- mfai.pytorch.models.nlam.create_mesh.prepend_node_index(graph, new_index)[source]¶
- Return type:
Graph- Parameters:
graph (Graph)
new_index (int)