7 #ifndef WARPX_ACCELERATORLATTICE_LATTICEELEMENTS_HARDEDGED_K_H_
8 #define WARPX_ACCELERATORLATTICE_LATTICEELEMENTS_HARDEDGED_K_H_
26 const amrex::ParticleReal zpvdt,
27 const amrex::ParticleReal zs,
28 const amrex::ParticleReal ze)
31 using namespace amrex::literals;
34 amrex::ParticleReal
const zl = std::min(z, zpvdt);
35 amrex::ParticleReal
const zr = std::max(z, zpvdt);
42 amrex::ParticleReal
const zl_bounded = std::min(std::max(zl, zs), ze);
43 amrex::ParticleReal
const zr_bounded = std::min(std::max(zr, zs), ze);
44 const amrex::ParticleReal frac = (zr_bounded - zl_bounded)/(zr - zl);
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal hard_edged_fraction(const amrex::ParticleReal z, const amrex::ParticleReal zpvdt, const amrex::ParticleReal zs, const amrex::ParticleReal ze)
Calculate the residence correction, the fraction of the time step the particle spends inside of the h...
Definition: HardEdged_K.H:25