diff options
-rw-r--r-- | Source/Particles/Pusher/UpdatePosition.H | 2 | ||||
-rw-r--r-- | Source/Particles/WarpXParticleContainer.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Source/Particles/Pusher/UpdatePosition.H b/Source/Particles/Pusher/UpdatePosition.H index 1442ac28e..0a4f579f4 100644 --- a/Source/Particles/Pusher/UpdatePosition.H +++ b/Source/Particles/Pusher/UpdatePosition.H @@ -1,6 +1,8 @@ #ifndef WARPX_PARTICLES_PUSHER_UPDATEPOSITION_H_ #define WARPX_PARTICLES_PUSHER_UPDATEPOSITION_H_ +#include <AMReX_FArrayBox.H> +#include <WarpXConst.H> #include <AMReX_REAL.H> /* \brief Push the particle's positions over one timestep, 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 } |