WarpX
Functions
HardEdged_K.H File Reference
#include "Utils/WarpXConst.H"
#include <AMReX_REAL.H>

Go to the source code of this file.

Functions

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 hard edge lattice element. More...
 

Function Documentation

◆ hard_edged_fraction()

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 hard edge lattice element.

Parameters
[in]zthe current location of the particle
[in]zpvdtthe estimated future location of the particle, z + v*dt
[in]zsthe start of the lattice element
[in]zethe end of the lattice element
Returns
the fraction is returned