mindelec.vision.vtk_structure

mindelec.vision.vtk_structure(grid_tensor, eh_tensor, path_res)[源代码]

生成可视化的3D vtk文件。

参数:
  • grid_tensor (numpy.ndarray) - 网格数据,shape为(dim_t, dim_x, dim_y, dim_z, 4)。

  • eh_tensor (numpy.ndarray) - 电磁数据,shape为(dim_t, dim_x, dim_y, dim_z, 6)。

  • path_res (str) - 输出vtk文件的保存路径。

支持平台:

Ascend

样例:

>>> import numpy as np
>>> from mindelec.vision import vtk_structure
>>> grid_tensor = np.random.rand(20, 10, 10, 10, 4).astype(np.float32)
>>> eh_tensor = np.random.rand(20, 10, 10, 10, 6).astype(np.float32)
>>> path_res = './result_vtk'
>>> vtk_structure(grid_tensor, eh_tensor, path_res)