def get_Conductivity(XYZ, sig0, sig1, R):
"""
Define the conductivity for each point of the space
"""
x, y, z = XYZ[:, 0], XYZ[:, 1], XYZ[:, 2]
r_view = r(x, y, z)
ind0 = (r_view > R)
ind1 = (r_view <= R)
assert (ind0 + ind1).all(), 'Some indicies not included'
Sigma = np.zeros_like(x)
Sigma[ind0] = sig0
Sigma[ind1] = sig1
return Sigma
sphereElectrostatic_example.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录