pw_lorentz_test.py 文件源码

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

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

        for idx in np.ndindex(3, 3, 3):
            if idx == self.idx:
                self.assertEqual(sample.get_mu_inf(idx), self.meep.mu_inf)
            else:
                self.assertEqual(sample.get_mu_inf(idx), 0)

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


问题


面经


文章

微信
公众号

扫码关注公众号