Skip to content

Commit

Permalink
Fix in FieldEnergy
Browse files Browse the repository at this point in the history
  • Loading branch information
dpgrote committed Jun 7, 2024
1 parent 4604386 commit 33c5552
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/Diagnostics/ReducedDiags/FieldEnergy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ void FieldEnergy::ComputeDiags (int step)
const std::array<Real, 3> &dx = WarpX::CellSize(lev);
const amrex::Real dV = dx[0]*dx[1]*dx[2];

Geometry const & geom = warpx.Geom(lev);

#if defined(WARPX_DIM_RZ)
amrex::Real const tmpEx = ComputeNorm2RZ(Ex, lev);
amrex::Real const tmpEy = ComputeNorm2RZ(Ey, lev);
Expand All @@ -115,6 +113,8 @@ void FieldEnergy::ComputeDiags (int step)
amrex::Real const tmpBz = ComputeNorm2RZ(Bz, lev);
amrex::Real const Bs = tmpBx + tmpBy + tmpBz;
#else
Geometry const & geom = warpx.Geom(lev);

// compute E squared
Real const tmpEx = Ex.norm2(0,geom.periodicity());
Real const tmpEy = Ey.norm2(0,geom.periodicity());
Expand Down

0 comments on commit 33c5552

Please sign in to comment.