diff options
author | 2019-06-03 10:45:35 +0200 | |
---|---|---|
committer | 2019-06-03 10:45:35 +0200 | |
commit | 679156e73e537284b97e642ef13f9d784b44f264 (patch) | |
tree | 6419077e65a104eeb6c27b0da160e63c314c184d /Source/Particles/PhotonParticleContainer.cpp | |
parent | 1ebc8d24940889699bfc477fe84bed04fd885dcd (diff) | |
download | WarpX-679156e73e537284b97e642ef13f9d784b44f264.tar.gz WarpX-679156e73e537284b97e642ef13f9d784b44f264.tar.zst WarpX-679156e73e537284b97e642ef13f9d784b44f264.zip |
Added dedicated pusher to photons
Diffstat (limited to 'Source/Particles/PhotonParticleContainer.cpp')
-rw-r--r-- | Source/Particles/PhotonParticleContainer.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/Source/Particles/PhotonParticleContainer.cpp b/Source/Particles/PhotonParticleContainer.cpp index b4070a773..0e1adc13b 100644 --- a/Source/Particles/PhotonParticleContainer.cpp +++ b/Source/Particles/PhotonParticleContainer.cpp @@ -22,7 +22,7 @@ PhotonParticleContainer::PhotonParticleContainer (AmrCore* amr_core, int ispecie // where <species> is the name of your species ParmParse pp(species_name); - // read <species>.size_in_inches in the input file, and + // read <species>.size_in_inches in the input file, and // store it into member data. pp.query("size_in_inches", size_in_inches); @@ -56,13 +56,20 @@ PhotonParticleContainer::PushPX(WarpXParIter& pti, auto& Byp = attribs[PIdx::By]; auto& Bzp = attribs[PIdx::Bz]; const long np = pti.numParticles(); - - // Probably want to push photons in some way here. - // PhysicalParticleContainer::PushPX is probably - // a good start. Let's start by writing CPU code. - for (WarpXParIter pti(*this, 0); pti.isValid(); ++pti) - { - } + + // Using new pusher for positions + const amrex_real zero_mass = 0.0; + const amrex_real zero_charge = 0.0; + warpx_particle_pusher_positions(&np, + xp.dataPtr(), + yp.dataPtr(), + zp.dataPtr(), + uxp.dataPtr(), uyp.dataPtr(), uzp.dataPtr(), + giv.dataPtr(), + Exp.dataPtr(), Eyp.dataPtr(), Ezp.dataPtr(), + Bxp.dataPtr(), Byp.dataPtr(), Bzp.dataPtr(), + &zero_charge, &zero_mass, &dt, + &WarpX::particle_pusher_algo); } void @@ -77,7 +84,7 @@ PhotonParticleContainer::Evolve (int lev, Real t, Real dt) { // This does gather, push and depose. - // Push and depose have been re-written for photon, + // Push and depose have been re-written for photon, // so they do not do anything. // Currently, I guess photons do gather fields from the mesh. PhysicalParticleContainer::Evolve (lev, |