ImpactX
|
#include <RFCavity.H>
Public Types | |
using | PType = ImpactXParticleContainer::ParticleType |
Public Member Functions | |
AMREX_GPU_HOST | RFCavity (amrex::ParticleReal ds, amrex::ParticleReal escale, amrex::ParticleReal freq, amrex::ParticleReal phase, std::vector< amrex::ParticleReal > cos_coef, std::vector< amrex::ParticleReal > sin_coef, int mapsteps=1, int nslice=1) |
RFCavity (RFCavity const &other) | |
RFCavity & | operator= (RFCavity const &other) |
RFCavity (RFCavity &&other)=default | |
RFCavity & | operator= (RFCavity &&other)=default |
AMREX_GPU_HOST | ~RFCavity ()=default |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | operator() (PType &AMREX_RESTRICT p, amrex::ParticleReal &AMREX_RESTRICT px, amrex::ParticleReal &AMREX_RESTRICT py, amrex::ParticleReal &AMREX_RESTRICT pt, [[maybe_unused]] RefPart const &refpart) const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | operator() (RefPart &AMREX_RESTRICT refpart) const |
std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE | RF_Efield (amrex::ParticleReal const zeval) const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | map3 (amrex::ParticleReal const tau, RefPart &refpart, [[maybe_unused]] amrex::ParticleReal &zeval) const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | map2 (amrex::ParticleReal const tau, RefPart &refpart, amrex::ParticleReal &zeval) const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | map1 (amrex::ParticleReal const tau, RefPart &refpart, amrex::ParticleReal &zeval) const |
![]() | |
void | operator() (ImpactXParticleContainer &pc, int step) |
void | operator() (ImpactXParticleContainer::iterator &pti, RefPart &AMREX_RESTRICT ref_part) |
![]() | |
Thick (amrex::ParticleReal const ds, int const nslice) | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | nslice () const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal | ds () const |
![]() | |
RFCavity_device_copyable (amrex::ParticleReal escale, amrex::ParticleReal freq, amrex::ParticleReal phase, int mapsteps=1) | |
non-owning pointer to device sine coefficients More... | |
RFCavity_device_copyable (RFCavity_device_copyable const &)=default | |
RFCavity_device_copyable & | operator= (RFCavity_device_copyable const &)=default |
RFCavity_device_copyable (RFCavity_device_copyable &&)=default | |
RFCavity_device_copyable & | operator= (RFCavity_device_copyable &&)=default |
Static Public Attributes | |
static constexpr auto | name = "RFCavity" |
Private Attributes | |
amrex::Gpu::DeviceVector< amrex::ParticleReal > | m_cos_coef |
amrex::Gpu::DeviceVector< amrex::ParticleReal > | m_sin_coef |
cosine coefficients in Fourier expansion of on-axis electric field Ez More... | |
Additional Inherited Members | |
![]() | |
amrex::ParticleReal | m_escale |
amrex::ParticleReal | m_freq |
scaling factor for RF electric field More... | |
amrex::ParticleReal | m_phase |
RF frequency in Hz. More... | |
int | m_mapsteps |
RF driven phase in deg. More... | |
int | m_ncoef = 0 |
number of map integration steps per slice More... | |
amrex::ParticleReal * | m_cos_data = nullptr |
number of Fourier coefficients More... | |
amrex::ParticleReal * | m_sin_data = nullptr |
non-owning pointer to device cosine coefficients More... | |
![]() | |
amrex::ParticleReal | m_ds |
int | m_nslice |
segment length in m More... | |
|
inline |
An RF cavity
ds | Segment length in m |
escale | Scaling factor for on-axis RF electric field in 1/m |
freq | RF frequency in Hz |
phase | RF driven phase in deg |
cos_coef | TODO |
sin_coef | TODO |
mapsteps | number of integration steps per slice used for map and reference particle push in applied fields |
nslice | number of slices used for the application of space charge |
|
inline |
|
default |
|
default |
|
inline |
This pushes the reference particle and the linear map matrix elements for an RF cavity through the symplectic map associated with H_1 in the Hamiltonian splitting H = H_1 + H_2 + H_3.
tau | Map step size in m | |
[in,out] | refpart | reference particle |
[in,out] | zeval | Longitudinal on-axis location in m |
|
inline |
This pushes the reference particle and the linear map matrix elements for an RF cavity through the symplectic map associated with H_2 in the Hamiltonian splitting H = H_1 + H_2 + H_3.
tau | Map step size in m | |
[in,out] | refpart | reference particle |
[in,out] | zeval | Longitudinal on-axis location in m |
|
inline |
This pushes the reference particle and the linear map matrix elements for an RF cavity through the symplectic map associated with H_3 in the Hamiltonian splitting H = H_1 + H_2 + H_3.
tau | Map step size in m | |
[in,out] | refpart | reference particle |
[in,out] | zeval | Longitudinal on-axis location in m |
|
inline |
This is an RF cavity functor, so that a variable of this type can be used like an RF cavity function.
p | Particle AoS data for positions and cpu/id |
px | particle momentum in x |
py | particle momentum in y |
pt | particle momentum in t |
refpart | reference particle |
|
inline |
This pushes the reference particle.
[in,out] | refpart | reference particle |
|
inline |
This evaluates the on-axis RF electric field at a fixed location z, together with certain required integrals and derivatives. The field returned is normalized to a peak value of 1.
zeval | Longitudinal on-axis location in m |
|
private |
|
private |
cosine coefficients in Fourier expansion of on-axis electric field Ez
|
static |