e dot j should be masked as well

This commit is contained in:
Jan Petykiewicz 2019-11-04 20:48:14 -08:00
parent ca70d6e6c8
commit 8794cbd7c2

View File

@ -30,7 +30,7 @@ def test_poynting_planes(sim):
s[2, mask].sum(), -s[2, mz].sum()]
e_dot_j = sim.e * sim.j * sim.dxes[0][0][:, None, None] * sim.dxes[0][1][None, :, None] * sim.dxes[0][2][None, None, :]
src_energy = -e_dot_j.real / 2
src_energy = -e_dot_j[:, mask].real / 2
assert_close(sum(planes), (src_energy).sum())