diff options
author | 2020-01-24 11:03:48 -0800 | |
---|---|---|
committer | 2020-01-24 11:03:48 -0800 | |
commit | a32b3292967b6b0ee766ad14303c6cd0f2369b04 (patch) | |
tree | f271f8104c0cc38784bbbe6cb3f8747d12cc3d32 /Source/Particles/PhysicalParticleContainer.H | |
parent | 50b7e6c7189e98241684212dbae37f85cb43a02f (diff) | |
parent | c5d8298284709dbea9f2c764bf429872933de11c (diff) | |
download | WarpX-a32b3292967b6b0ee766ad14303c6cd0f2369b04.tar.gz WarpX-a32b3292967b6b0ee766ad14303c6cd0f2369b04.tar.zst WarpX-a32b3292967b6b0ee766ad14303c6cd0f2369b04.zip |
Merge pull request #609 from RevathiJambunathan/ParticlesEBParser
Externally applied E/B fields on the particles using parser
Diffstat (limited to 'Source/Particles/PhysicalParticleContainer.H')
-rw-r--r-- | Source/Particles/PhysicalParticleContainer.H | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/Particles/PhysicalParticleContainer.H b/Source/Particles/PhysicalParticleContainer.H index 0192ffb37..74d1a0f62 100644 --- a/Source/Particles/PhysicalParticleContainer.H +++ b/Source/Particles/PhysicalParticleContainer.H @@ -47,6 +47,26 @@ public: amrex::Real t, amrex::Real dt) override; #endif // WARPX_DO_ELECTROSTATIC + /** + * \brief Apply external E and B fields on the particles. The E and B + * fields could be defined as a constant or using a parser for reading + * in a mathematical expression. The default value for the E- and B-fields + * is (0.0,0.0,0.0). + * + * \param[in,out] Exp-Bzp pointer to fields on particles modified based + * on external E and B + * \param[in] xp,yp,zp arrays of particle positions required to compute + * mathematical expression for the external fields + * using parser. + */ + void AssignExternalFieldOnParticles ( WarpXParIter& pti, + RealVector& Exp, RealVector& Eyp, + RealVector& Ezp, RealVector& Bxp, + RealVector& Byp, RealVector& Bzp, + amrex::Gpu::ManagedDeviceVector<amrex::ParticleReal> xp, + amrex::Gpu::ManagedDeviceVector<amrex::ParticleReal> yp, + amrex::Gpu::ManagedDeviceVector<amrex::ParticleReal> zp, int lev); + virtual void FieldGather (int lev, const amrex::MultiFab& Ex, const amrex::MultiFab& Ey, @@ -318,6 +338,7 @@ protected: //radiation reaction bool do_classical_radiation_reaction = false; + #ifdef WARPX_QED // A flag to enable quantum_synchrotron process for leptons bool m_do_qed_quantum_sync = false; |