本文整理汇总了Python中pyne.mesh.Mesh.vol_id[:]方法的典型用法代码示例。如果您正苦于以下问题:Python Mesh.vol_id[:]方法的具体用法?Python Mesh.vol_id[:]怎么用?Python Mesh.vol_id[:]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyne.mesh.Mesh
的用法示例。
在下文中一共展示了Mesh.vol_id[:]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Mesh
# 需要导入模块: from pyne.mesh import Mesh [as 别名]
# 或者: from pyne.mesh.Mesh import vol_id[:] [as 别名]
mesh = Mesh(mesh="../geom/conv_pipe_mesh.h5m")
# load dag geometry
load("../geom/conv_pipe_geom.h5m")
# discretise geom onto mesh
cell_fracs = discretize_geom(mesh)
mesh.vol_id = IMeshTag(1,int)
mesh.source_strength = IMeshTag(1,float)
id_list = []
for element in cell_fracs:
id_list.append(element["cell"])
mesh.vol_id[:]=id_list
# loop along path, use point in volume to determine the vol id
volumes = get_all_cells(xyz,direction,speed)
# loop along path, use point in volume to determine the vol id
# but tag each tet in the range with right source strength
dump = get_all_cells_detailed(xyz,direction,speed,mesh)
sys.exit()
# now tag all intities with the appropriate
source_strength = []
for value in mesh.vol_id[:]:
if value in volumes.keys():