materials macro for evtk

这个提交包含在:
jasminium
2021-05-12 21:50:52 +02:00
父节点 f58349e4f2
当前提交 038b9d84bf
共有 3 个文件被更改,包括 81 次插入2 次删除

查看文件

@@ -205,8 +205,10 @@ class GeometryView:
pml = np.ones((G.nx, G.ny, G.nz))
pml[10:-10, 10:-10, 10:-10] = 0
material_ids = ','.join([m.ID for m in G.materials if '+' not in m.ID])
fp = './test-evtk-hl'
rectilinearToVTK(fp, x, y, z, cellData = {"materials" : G.solid, "pml": pml}, comments = ['hi', 'world'])
rectilinearToVTK(fp, x, y, z, cellData = {"Material" : G.solid, "pml": pml}, comments = [material_ids, 'world'])
def write_vtk(self, G, pbar):
"""Writes the geometry information to a VTK file.