8 #ifndef WARPX_schwinger_process_wrapper_h_ 9 #define WARPX_schwinger_process_wrapper_h_ 13 #include <AMReX_Random.H> 15 #include <picsar_qed/physics/schwinger/schwinger_pair_engine_core.hpp> 38 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
41 const amrex::ParticleReal Ex,
const amrex::ParticleReal Ey,
const amrex::ParticleReal Ez,
42 const amrex::ParticleReal Bx,
const amrex::ParticleReal By,
const amrex::ParticleReal Bz,
43 const amrex::ParticleReal PoissonToGaussianThreshold,
44 amrex::RandomEngine
const& engine)
46 using namespace amrex;
47 namespace pxr_p = picsar::multi_physics::phys;
48 namespace pxr_sh = picsar::multi_physics::phys::schwinger;
50 const auto expectedPairNumber =
51 pxr_sh::expected_pair_number<amrex::Real, pxr_p::unit_system::SI>(
52 Ex, Ey, Ez, Bx, By, Bz, dV, dt);
54 if (expectedPairNumber <= PoissonToGaussianThreshold) {
55 return amrex::RandomPoisson(expectedPairNumber, engine);
58 amrex::RandomNormal(expectedPairNumber, std::sqrt(expectedPairNumber), engine);
59 return numpairs > 0._rt ? numpairs : 0._rt;
63 #endif // WARPX_schwinger_process_wrapper_h_ AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real getSchwingerProductionNumber(const amrex::Real dV, const amrex::Real dt, const amrex::ParticleReal Ex, const amrex::ParticleReal Ey, const amrex::ParticleReal Ez, const amrex::ParticleReal Bx, const amrex::ParticleReal By, const amrex::ParticleReal Bz, const amrex::ParticleReal PoissonToGaussianThreshold, amrex::RandomEngine const &engine)
Definition: SchwingerProcessWrapper.H:40
Definition: BreitWheelerEngineWrapper.H:35