diff options
author | 2019-10-07 11:37:46 -0700 | |
---|---|---|
committer | 2019-10-07 11:37:46 -0700 | |
commit | 07795799555d9843017269415195f2226755e4a7 (patch) | |
tree | c76fd8c3b9524f891c65cbca169516618945eee7 /Source/Particles/PhysicalParticleContainer.cpp | |
parent | 10d22fb4126732b4b088dce568252532da7be39f (diff) | |
download | WarpX-07795799555d9843017269415195f2226755e4a7.tar.gz WarpX-07795799555d9843017269415195f2226755e4a7.tar.zst WarpX-07795799555d9843017269415195f2226755e4a7.zip |
Add check 'if (WarpX::gamma_boost > 1.)' and removed unsused functions.
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.cpp | 30 |
1 files changed, 3 insertions, 27 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.cpp b/Source/Particles/PhysicalParticleContainer.cpp index 7c8c81eed..75e438454 100644 --- a/Source/Particles/PhysicalParticleContainer.cpp +++ b/Source/Particles/PhysicalParticleContainer.cpp @@ -236,6 +236,9 @@ PhysicalParticleContainer::CheckAndAddParticle(Real x, Real y, Real z, Gpu::HostVector<ParticleReal>& particle_uz, Gpu::HostVector<ParticleReal>& particle_w) { + if (WarpX::gamma_boost > 1.) { + MapParticletoBoostedFrame(x, y, z, u); + } particle_x.push_back(x); particle_y.push_back(y); particle_z.push_back(z); @@ -246,33 +249,6 @@ PhysicalParticleContainer::CheckAndAddParticle(Real x, Real y, Real z, } void -PhysicalParticleContainer::CheckAndAddParticle(Real x, Real y, Real z, - std::array<Real, 3> u, - Real weight) -{ - std::array<ParticleReal,PIdx::nattribs> attribs; - attribs.fill(0.0); - - // update attribs with input arguments - if (WarpX::gamma_boost > 1.) { - MapParticletoBoostedFrame(x, y, z, u); - } - attribs[PIdx::ux] = u[0]; - attribs[PIdx::uy] = u[1]; - attribs[PIdx::uz] = u[2]; - attribs[PIdx::w ] = weight; - - if ( (NumRuntimeRealComps()>0) || (NumRuntimeIntComps()>0) ) - { - // need to create old values - auto& particle_tile = DefineAndReturnParticleTile(0, 0, 0); - } - - // add particle - AddOneParticle(0, 0, 0, x, y, z, attribs); -} - -void PhysicalParticleContainer::AddParticles (int lev) { BL_PROFILE("PhysicalParticleContainer::AddParticles()"); |