8 #ifndef WARPX_schwinger_process_wrapper_h_ 9 #define WARPX_schwinger_process_wrapper_h_ 13 #include <physics/schwinger/schwinger_pair_engine_core.hpp> 14 #include <AMReX_Random.H> 36 AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE
39 const amrex::Real Ex,
const amrex::Real Ey,
const amrex::Real Ez,
40 const amrex::Real Bx,
const amrex::Real By,
const amrex::Real Bz,
41 const amrex::Real PoissonToGaussianThreshold,
42 amrex::RandomEngine
const& engine)
44 using namespace amrex;
45 namespace pxr_p = picsar::multi_physics::phys;
46 namespace pxr_sh = picsar::multi_physics::phys::schwinger;
48 const auto expectedPairNumber =
49 pxr_sh::expected_pair_number<amrex::Real, pxr_p::unit_system::SI>(
50 Ex, Ey, Ez, Bx, By, Bz, dV, dt);
52 if (expectedPairNumber <= PoissonToGaussianThreshold) {
53 return amrex::RandomPoisson(expectedPairNumber, engine);
56 amrex::RandomNormal(expectedPairNumber, std::sqrt(expectedPairNumber), engine);
57 return numpairs > 0._rt ? numpairs : 0._rt;
61 #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::Real Ex, const amrex::Real Ey, const amrex::Real Ez, const amrex::Real Bx, const amrex::Real By, const amrex::Real Bz, const amrex::Real PoissonToGaussianThreshold, amrex::RandomEngine const &engine)
Definition: SchwingerProcessWrapper.H:38