aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/Pusher/UpdatePositionPhoton.H
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Particles/Pusher/UpdatePositionPhoton.H')
-rw-r--r--Source/Particles/Pusher/UpdatePositionPhoton.H4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/Particles/Pusher/UpdatePositionPhoton.H b/Source/Particles/Pusher/UpdatePositionPhoton.H
index f52eb1c75..5e958c2c1 100644
--- a/Source/Particles/Pusher/UpdatePositionPhoton.H
+++ b/Source/Particles/Pusher/UpdatePositionPhoton.H
@@ -32,7 +32,11 @@ void UpdatePositionPhoton(
const amrex::Real c_over_umod = (u_norm == 0._rt) ? 0._rt: PhysConst::c/u_norm;
// Update positions over one time step
+#if (AMREX_SPACEDIM >= 2)
x += ux * c_over_umod * dt;
+#else
+ amrex::ignore_unused(x);
+#endif
#if (defined WARPX_DIM_3D) || (defined WARPX_DIM_RZ) // RZ pushes particles in 3D
y += uy * c_over_umod * dt;
#else