pw_upml_test.py 文件源码

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

项目:gmes 作者: aitatanit 项目源码 文件源码
def testExCmplx(self):
        sample = \
            self.upml.get_pw_material_ex(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)

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


问题


面经


文章

微信
公众号

扫码关注公众号