aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/WarpXParticleContainer.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Source/Particles/WarpXParticleContainer.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/Particles/WarpXParticleContainer.cpp b/Source/Particles/WarpXParticleContainer.cpp
index e04d6aa69..fa7fda233 100644
--- a/Source/Particles/WarpXParticleContainer.cpp
+++ b/Source/Particles/WarpXParticleContainer.cpp
@@ -1062,14 +1062,12 @@ WarpXParticleContainer::PushX (int lev, Real dt)
Real x, y, z; // Temporary variables
#ifndef WARPX_RZ
GetPosition( x, y, z, p ); // Initialize x, y, z
-#else
- GetCartesianPositionFromCylindrical( x, y, z, p, theta );
-#endif
- // Even for RZ, the particles are pushed in 3D Cartesian
UpdatePosition( x, y, z, ux[i], uy[i], uz[i], dt);
-#ifndef WARPX_RZ
SetPosition( p, x, y, z ); // Update the object p
#else
+ // For WARPX_RZ, the particles are still pushed in 3D Cartesian
+ GetCartesianPositionFromCylindrical( x, y, z, p, theta );
+ UpdatePosition( x, y, z, ux[i], uy[i], uz[i], dt);
SetCylindricalPositionFromCartesian( p, theta, x, y, z );
#endif
}