e dot j should take into account dxes
This commit is contained in:
parent
9253200eaf
commit
0bb4105e7a
@ -27,7 +27,7 @@ def test_poynting_planes(sim):
|
|||||||
s[0, mask].sum(), -s[1, my].sum(),
|
s[0, mask].sum(), -s[1, my].sum(),
|
||||||
s[0, mask].sum(), -s[2, mz].sum()]
|
s[0, mask].sum(), -s[2, mz].sum()]
|
||||||
|
|
||||||
e_dot_j = sim.e * sim.j
|
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.real / 2
|
||||||
|
|
||||||
assert_close(sum(planes), (src_energy).sum())
|
assert_close(sum(planes), (src_energy).sum())
|
||||||
|
Loading…
Reference in New Issue
Block a user