pw_cpml_test.py 文件源码

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

项目:gmes 作者: aitatanit 项目源码 文件源码
def testEzCmplx(self):
        sample = \
            self.cpml.get_pw_material_ez(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.cpml.eps_inf)
            else:
                self.assertEqual(sample.get_eps_inf(idx), 0)

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


问题


面经


文章

微信
公众号

扫码关注公众号