aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/Pusher/UpdatePosition.H
diff options
context:
space:
mode:
authorGravatar Remi Lehe <remi.lehe@normalesup.org> 2020-02-03 09:26:07 -0800
committerGravatar GitHub <noreply@github.com> 2020-02-03 09:26:07 -0800
commit81992738e864bac70ff7c034bfd25749ee0fba6a (patch)
tree9dc6c3c51e5d75ca3a9d464e11bd6451e9bd5371 /Source/Particles/Pusher/UpdatePosition.H
parent7af4917c442401e3f074350be7399b1d4998a8bd (diff)
parent15f002a11c867ca20f6a053eb3ccac62394f8f74 (diff)
downloadWarpX-81992738e864bac70ff7c034bfd25749ee0fba6a.tar.gz
WarpX-81992738e864bac70ff7c034bfd25749ee0fba6a.tar.zst
WarpX-81992738e864bac70ff7c034bfd25749ee0fba6a.zip
Merge pull request #663 from atmyers/soa_to_aos
Remove copies to and from temporary arrays in favor of using the particle struct directy.
Diffstat (limited to 'Source/Particles/Pusher/UpdatePosition.H')
-rw-r--r--Source/Particles/Pusher/UpdatePosition.H8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/Particles/Pusher/UpdatePosition.H b/Source/Particles/Pusher/UpdatePosition.H
index 7f86a106d..1968a1439 100644
--- a/Source/Particles/Pusher/UpdatePosition.H
+++ b/Source/Particles/Pusher/UpdatePosition.H
@@ -15,10 +15,9 @@
/** \brief Push the particle's positions over one timestep,
* given the value of its momenta `ux`, `uy`, `uz` */
AMREX_GPU_HOST_DEVICE AMREX_INLINE
-void UpdatePosition(
- amrex::ParticleReal& x, amrex::ParticleReal& y, amrex::ParticleReal& z,
- const amrex::ParticleReal ux, const amrex::ParticleReal uy, const amrex::ParticleReal uz,
- const amrex::Real dt )
+void UpdatePosition(amrex::ParticleReal& x, amrex::ParticleReal& y, amrex::ParticleReal& z,
+ const amrex::ParticleReal ux, const amrex::ParticleReal uy, const amrex::ParticleReal uz,
+ const amrex::Real dt )
{
constexpr amrex::Real inv_c2 = 1./(PhysConst::c*PhysConst::c);
@@ -31,7 +30,6 @@ void UpdatePosition(
y += uy * inv_gamma * dt;
#endif
z += uz * inv_gamma * dt;
-
}
#endif // WARPX_PARTICLES_PUSHER_UPDATEPOSITION_H_