From 2a45d27a5aed1de8531f07e0756c14533e09bc1a Mon Sep 17 00:00:00 2001 From: MaxThevenet Date: Thu, 1 Aug 2019 15:32:28 -0700 Subject: remove unused variables --- Source/Particles/RigidInjectedParticleContainer.cpp | 3 --- 1 file changed, 3 deletions(-) (limited to 'Source/Particles/RigidInjectedParticleContainer.cpp') diff --git a/Source/Particles/RigidInjectedParticleContainer.cpp b/Source/Particles/RigidInjectedParticleContainer.cpp index 79396e6af..84c14dd7c 100644 --- a/Source/Particles/RigidInjectedParticleContainer.cpp +++ b/Source/Particles/RigidInjectedParticleContainer.cpp @@ -459,9 +459,6 @@ RigidInjectedParticleContainer::PushP (int lev, Real dt, Real* const AMREX_RESTRICT uxpp = uxp.dataPtr(); Real* const AMREX_RESTRICT uypp = uyp.dataPtr(); Real* const AMREX_RESTRICT uzpp = uzp.dataPtr(); - const Real* const AMREX_RESTRICT uxp_savep = uxp_save.dataPtr(); - const Real* const AMREX_RESTRICT uyp_savep = uyp_save.dataPtr(); - const Real* const AMREX_RESTRICT uzp_savep = uzp_save.dataPtr(); const Real* const AMREX_RESTRICT Expp = Exp.dataPtr(); const Real* const AMREX_RESTRICT Eypp = Eyp.dataPtr(); const Real* const AMREX_RESTRICT Ezpp = Ezp.dataPtr(); -- cgit v1.2.3 From 43ef6e29a1eeba61b9fdb95efb1bb1e301ba1b6d Mon Sep 17 00:00:00 2001 From: Dave Grote Date: Fri, 2 Aug 2019 17:25:35 -0700 Subject: PushP now uses FIeldGather --- Source/Particles/PhysicalParticleContainer.cpp | 7 +++++++ Source/Particles/RigidInjectedParticleContainer.cpp | 7 +++++++ 2 files changed, 14 insertions(+) (limited to 'Source/Particles/RigidInjectedParticleContainer.cpp') diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index a34fb69e2..89ea3c9f3 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -1647,6 +1647,7 @@ PhysicalParticleContainer::PushP (int lev, Real dt, const int ll4symtry = false; long lvect_fieldgathe = 64; +#ifdef WARPX_RZ warpx_geteb_energy_conserving( &np, m_xp[thread_num].dataPtr(), @@ -1666,6 +1667,12 @@ PhysicalParticleContainer::PushP (int lev, Real dt, BL_TO_FORTRAN_ANYD(bzfab), &ll4symtry, &WarpX::l_lower_order_in_v, &WarpX::do_nodal, &lvect_fieldgathe, &WarpX::field_gathering_algo); +#else + int e_is_nodal = Ex.is_nodal() and Ey.is_nodal() and Ez.is_nodal(); + FieldGather(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, + &exfab, &eyfab, &ezfab, &bxfab, &byfab, &bzfab, + Ex.nGrow(), e_is_nodal, 0, np, thread_num, lev, lev); +#endif // This wraps the momentum advance so that inheritors can modify the call. // Extract pointers to the different particle quantities diff --git a/Source/Particles/RigidInjectedParticleContainer.cpp b/Source/Particles/RigidInjectedParticleContainer.cpp index 84c14dd7c..df809a5f0 100644 --- a/Source/Particles/RigidInjectedParticleContainer.cpp +++ b/Source/Particles/RigidInjectedParticleContainer.cpp @@ -427,6 +427,7 @@ RigidInjectedParticleContainer::PushP (int lev, Real dt, const int ll4symtry = false; long lvect_fieldgathe = 64; +#ifdef WARPX_RZ warpx_geteb_energy_conserving( &np, m_xp[thread_num].dataPtr(), @@ -446,6 +447,12 @@ RigidInjectedParticleContainer::PushP (int lev, Real dt, BL_TO_FORTRAN_ANYD(bzfab), &ll4symtry, &WarpX::l_lower_order_in_v, &WarpX::do_nodal, &lvect_fieldgathe, &WarpX::field_gathering_algo); +#else + int e_is_nodal = Ex.is_nodal() and Ey.is_nodal() and Ez.is_nodal(); + FieldGather(pti, Exp, Eyp, Ezp, Bxp, Byp, Bzp, + &exfab, &eyfab, &ezfab, &bxfab, &byfab, &bzfab, + Ex.nGrow(), e_is_nodal, 0, np, thread_num, lev, lev); +#endif // Save the position and momenta, making copies auto uxp_save = uxp; -- cgit v1.2.3 From 69a94bfb22c09e96ffb31f3bea95a69f7f949319 Mon Sep 17 00:00:00 2001 From: Dave Grote Date: Fri, 2 Aug 2019 17:44:26 -0700 Subject: Minor fix in RigidParticleContainer::PushP --- Source/Particles/RigidInjectedParticleContainer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Source/Particles/RigidInjectedParticleContainer.cpp') diff --git a/Source/Particles/RigidInjectedParticleContainer.cpp b/Source/Particles/RigidInjectedParticleContainer.cpp index df809a5f0..83556e69f 100644 --- a/Source/Particles/RigidInjectedParticleContainer.cpp +++ b/Source/Particles/RigidInjectedParticleContainer.cpp @@ -421,13 +421,13 @@ RigidInjectedParticleContainer::PushP (int lev, Real dt, // pti.GetPosition(m_xp[thread_num], m_yp[thread_num], m_zp[thread_num]); +#ifdef WARPX_RZ const std::array& xyzmin_grid = WarpX::LowerCorner(box, lev); const int* ixyzmin_grid = box.loVect(); const int ll4symtry = false; long lvect_fieldgathe = 64; -#ifdef WARPX_RZ warpx_geteb_energy_conserving( &np, m_xp[thread_num].dataPtr(), -- cgit v1.2.3