def testHxCmplx(self):
sample = \
self.meep.get_pw_material_hx(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)
hx = ez = ey = np.zeros((3,3,3), complex)
dy = dz = dt = 1
n = 0
sample.update_all(hx, ez, ey, dy, dz, dt, n)
for idx in np.ndindex(3, 3, 3):
self.assertEqual(hx[idx], 0j)
评论列表
文章目录