7 #ifndef WARPX_ACCELERATORLATTICE_LATTICEELEMENTS_HARDEDGEDPLASMALENS_H_
8 #define WARPX_ACCELERATORLATTICE_LATTICEELEMENTS_HARDEDGEDPLASMALENS_H_
50 std::vector<amrex::ParticleReal>
h_dEdx;
51 std::vector<amrex::ParticleReal>
h_dBdx;
94 const amrex::ParticleReal
x,
95 const amrex::ParticleReal
y,
96 const amrex::ParticleReal
z,
97 const amrex::ParticleReal zpvdt,
98 amrex::ParticleReal& Ex,
99 amrex::ParticleReal& Ey,
100 amrex::ParticleReal& Bx,
101 amrex::ParticleReal& By)
const
108 amrex::ParticleReal dEdx = frac*
d_dEdx_arr[ielement];
109 amrex::ParticleReal dBdx = frac*
d_dBdx_arr[ielement];
#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:26
def y
Definition: Excitation_Flag_Generator.py:76
def x
Formats datastring to remove "+" at the end of the string #####.
Definition: Excitation_Flag_Generator.py:75
def z
Definition: Excitation_Flag_Generator.py:77
Definition: HardEdgedPlasmaLens.H:67
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void get_field(const int ielement, const amrex::ParticleReal x, const amrex::ParticleReal y, const amrex::ParticleReal z, const amrex::ParticleReal zpvdt, amrex::ParticleReal &Ex, amrex::ParticleReal &Ey, amrex::ParticleReal &Bx, amrex::ParticleReal &By) const
Fetch the field of the specified element at the given location.
Definition: HardEdgedPlasmaLens.H:93
const amrex::ParticleReal *AMREX_RESTRICT d_ze_arr
Definition: HardEdgedPlasmaLens.H:79
const amrex::ParticleReal *AMREX_RESTRICT d_dBdx_arr
Definition: HardEdgedPlasmaLens.H:82
int nelements
Definition: HardEdgedPlasmaLens.H:76
void InitHardEdgedPlasmaLensDevice(HardEdgedPlasmaLens const &h_plasmalens)
Initializes the data and pointer needed to reference the lattice element info.
Definition: HardEdgedPlasmaLens.cpp:57
const amrex::ParticleReal *AMREX_RESTRICT d_zs_arr
Definition: HardEdgedPlasmaLens.H:78
const amrex::ParticleReal *AMREX_RESTRICT d_dEdx_arr
Definition: HardEdgedPlasmaLens.H:81
Definition: HardEdgedPlasmaLens.H:27
std::vector< amrex::ParticleReal > h_dEdx
Definition: HardEdgedPlasmaLens.H:50
~HardEdgedPlasmaLens()=default
HardEdgedPlasmaLensDevice GetDeviceInstance() const
Returns the device level instance with the lattice information.
Definition: HardEdgedPlasmaLens.cpp:49
amrex::Gpu::DeviceVector< amrex::ParticleReal > d_dBdx
Definition: HardEdgedPlasmaLens.H:54
void WriteToDevice()
Write the element information to the device.
Definition: HardEdgedPlasmaLens.cpp:38
HardEdgedPlasmaLens()
Definition: HardEdgedPlasmaLens.cpp:16
void AddElement(amrex::ParmParse &pp_element, amrex::ParticleReal &z_location)
Read in an element and add it to the lists.
Definition: HardEdgedPlasmaLens.cpp:22
std::vector< amrex::ParticleReal > h_dBdx
Definition: HardEdgedPlasmaLens.H:51
amrex::Gpu::DeviceVector< amrex::ParticleReal > d_dEdx
Definition: HardEdgedPlasmaLens.H:53
Definition: LatticeElementBase.H:18