Skip to content

Commit acb8d25

Browse files
authored
Apply suggestions from code review
1 parent 6129bb4 commit acb8d25

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

openpmd_viewer/addons/pic/lpa_diagnostics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ def get_electromagnetic_energy( self, t=None, iteration=None ):
721721
# Compute the energy
722722
energy_density = const.epsilon_0/2.*(Ex**2 + Ey**2 + Ez**2) + 1./(2*const.mu_0)*(Bx**2 + By**2 + Bz**2)
723723
volume = info.dx*info.dy*info.dz # Cell volume
724-
E = (energy_density*volume).sum()
724+
E = energy_density.sum() * volume
725725
return E
726726

727727

0 commit comments

Comments
 (0)