pw_upml_test.py 文件源码

python
阅读 69 收藏 0 点赞 0 评论 0

项目:gmes 作者: aitatanit 项目源码 文件源码
def testEyCmplx(self):
        sample = \
            self.upml.get_pw_material_ey(self.idx, (0,0,0), cmplx=True)

        for idx in np.ndindex(3, 3, 3):
            if idx == self.idx:
                self.assertEqual(sample.get_eps_inf(idx), self.upml.eps_inf)
            else:
                self.assertEqual(sample.get_eps_inf(idx), 0)

        ey = hx = hz = np.zeros((3,3,3), complex)
        dz = dx = dt = 1
        n = 0
        sample.update_all(ey, hx, hz, dz, dx, dt, n)
        for idx in np.ndindex(3, 3, 3):
            self.assertEqual(ey[idx], 0j)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号