aboutsummaryrefslogtreecommitdiff
path: root/Source/Particles/RigidInjectedParticleContainer.cpp
diff options
context:
space:
mode:
authorGravatar ablelly <aurore.blelly@ensta-paristech.fr> 2019-08-30 16:40:38 +0200
committerGravatar ablelly <aurore.blelly@ensta-paristech.fr> 2019-08-30 16:40:38 +0200
commit2f92b3877293bf51282becb6e8e55f06a8052207 (patch)
tree514cbeeb5e69975ff1f79c83ca87a85e141b96a0 /Source/Particles/RigidInjectedParticleContainer.cpp
parentb1891e46af784e0423cbfda94a121e877c64b9e0 (diff)
parent0d188ff20e4c13e291e8117295fcabcff6663df9 (diff)
downloadWarpX-2f92b3877293bf51282becb6e8e55f06a8052207.tar.gz
WarpX-2f92b3877293bf51282becb6e8e55f06a8052207.tar.zst
WarpX-2f92b3877293bf51282becb6e8e55f06a8052207.zip
Merge branch 'merged_overlap_pml' of https://github.com/ablelly/WarpX into merged_overlap_pml
Diffstat (limited to 'Source/Particles/RigidInjectedParticleContainer.cpp')
-rw-r--r--Source/Particles/RigidInjectedParticleContainer.cpp43
1 files changed, 13 insertions, 30 deletions
diff --git a/Source/Particles/RigidInjectedParticleContainer.cpp b/Source/Particles/RigidInjectedParticleContainer.cpp
index 36cb9d224..0c94d1e33 100644
--- a/Source/Particles/RigidInjectedParticleContainer.cpp
+++ b/Source/Particles/RigidInjectedParticleContainer.cpp
@@ -239,15 +239,13 @@ RigidInjectedParticleContainer::PushPX(WarpXParIter& pti,
Real* const AMREX_RESTRICT Bzp = attribs[PIdx::Bz].dataPtr();
if (!done_injecting_lev) {
- if (!(WarpX::do_boosted_frame_diagnostic && do_boosted_frame_diags)) {
- // If the old values are not already saved, create copies here.
- xp_save = xp;
- yp_save = yp;
- zp_save = zp;
- uxp_save = uxp;
- uyp_save = uyp;
- uzp_save = uzp;
- }
+ // If the old values are not already saved, create copies here.
+ xp_save = xp;
+ yp_save = yp;
+ zp_save = zp;
+ uxp_save = uxp;
+ uyp_save = uyp;
+ uzp_save = uzp;
// Scale the fields of particles about to cross the injection plane.
// This only approximates what should be happening. The particles
@@ -275,27 +273,12 @@ RigidInjectedParticleContainer::PushPX(WarpXParIter& pti,
if (!done_injecting_lev) {
- Real* AMREX_RESTRICT x_save;
- Real* AMREX_RESTRICT y_save;
- Real* AMREX_RESTRICT z_save;
- Real* AMREX_RESTRICT ux_save;
- Real* AMREX_RESTRICT uy_save;
- Real* AMREX_RESTRICT uz_save;
- if (!(WarpX::do_boosted_frame_diagnostic && do_boosted_frame_diags)) {
- x_save = xp_save.dataPtr();
- y_save = yp_save.dataPtr();
- z_save = zp_save.dataPtr();
- ux_save = uxp_save.dataPtr();
- uy_save = uyp_save.dataPtr();
- uz_save = uzp_save.dataPtr();
- } else {
- x_save = pti.GetAttribs(particle_comps["xold"]).dataPtr();
- y_save = pti.GetAttribs(particle_comps["yold"]).dataPtr();
- z_save = pti.GetAttribs(particle_comps["zold"]).dataPtr();
- ux_save = pti.GetAttribs(particle_comps["uxold"]).dataPtr();
- uy_save = pti.GetAttribs(particle_comps["uyold"]).dataPtr();
- uz_save = pti.GetAttribs(particle_comps["uzold"]).dataPtr();
- }
+ Real* AMREX_RESTRICT x_save = xp_save.dataPtr();
+ Real* AMREX_RESTRICT y_save = yp_save.dataPtr();
+ Real* AMREX_RESTRICT z_save = zp_save.dataPtr();
+ Real* AMREX_RESTRICT ux_save = uxp_save.dataPtr();
+ Real* AMREX_RESTRICT uy_save = uyp_save.dataPtr();
+ Real* AMREX_RESTRICT uz_save = uzp_save.dataPtr();
// Undo the push for particles not injected yet.
// The zp are advanced a fixed amount.