ImpactX
|
#include <SoftQuad.H>
Public Types | |
using | PType = ImpactXParticleContainer::ParticleType |
Public Member Functions | |
SoftQuadrupole (amrex::ParticleReal ds, amrex::ParticleReal gscale, std::vector< amrex::ParticleReal > cos_coef, std::vector< amrex::ParticleReal > sin_coef, amrex::ParticleReal dx=0, amrex::ParticleReal dy=0, amrex::ParticleReal rotation_degree=0, int mapsteps=1, int nslice=1) | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | operator() (amrex::ParticleReal &AMREX_RESTRICT x, amrex::ParticleReal &AMREX_RESTRICT y, amrex::ParticleReal &AMREX_RESTRICT t, amrex::ParticleReal &AMREX_RESTRICT px, amrex::ParticleReal &AMREX_RESTRICT py, amrex::ParticleReal &AMREX_RESTRICT pt, [[maybe_unused]] uint64_t &AMREX_RESTRICT idcpu, [[maybe_unused]] RefPart const &refpart) const |
AMREX_GPU_HOST 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 | Quad_Bfield (amrex::ParticleReal const zeval) const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | map1 (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 |
void | finalize () |
![]() | |
void | operator() (ImpactXParticleContainer &pc, int step) |
void | operator() (ImpactXParticleContainer::iterator &pti, RefPart &AMREX_RESTRICT ref_part) |
![]() | |
Thick (amrex::ParticleReal ds, int nslice) | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | nslice () const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal | ds () const |
![]() | |
Alignment (amrex::ParticleReal dx, amrex::ParticleReal dy, amrex::ParticleReal rotation_degree) | |
Alignment ()=default | |
Alignment (Alignment const &)=default | |
Alignment & | operator= (Alignment const &)=default |
Alignment (Alignment &&)=default | |
Alignment & | operator= (Alignment &&rhs)=default |
~Alignment ()=default | |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | shift_in (amrex::ParticleReal &AMREX_RESTRICT x, amrex::ParticleReal &AMREX_RESTRICT y, amrex::ParticleReal &AMREX_RESTRICT px, amrex::ParticleReal &AMREX_RESTRICT py) const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | shift_out (amrex::ParticleReal &AMREX_RESTRICT x, amrex::ParticleReal &AMREX_RESTRICT y, amrex::ParticleReal &AMREX_RESTRICT px, amrex::ParticleReal &AMREX_RESTRICT py) const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal | dx () const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal | dy () const |
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal | rotation () const |
Public Attributes | |
amrex::ParticleReal | m_gscale |
int | m_mapsteps |
scaling factor for quad field gradient More... | |
int | m_id |
number of map integration steps per slice More... | |
int | m_ncoef = 0 |
unique soft quad id used for data lookup map More... | |
amrex::ParticleReal * | m_cos_h_data = nullptr |
number of Fourier coefficients More... | |
amrex::ParticleReal * | m_sin_h_data = nullptr |
non-owning pointer to host cosine coefficients More... | |
amrex::ParticleReal * | m_cos_d_data = nullptr |
non-owning pointer to host sine coefficients More... | |
amrex::ParticleReal * | m_sin_d_data = nullptr |
non-owning pointer to device cosine coefficients More... | |
![]() | |
amrex::ParticleReal | m_ds |
int | m_nslice |
segment length in m More... | |
![]() | |
amrex::ParticleReal | m_dx = 0 |
amrex::ParticleReal | m_dy = 0 |
horizontal translation error [m] More... | |
amrex::ParticleReal | m_rotation = 0 |
vertical translation error [m] More... | |
Static Public Attributes | |
static constexpr auto | name = "SoftQuadrupole" |
![]() | |
static constexpr amrex::ParticleReal | degree2rad = ablastr::constant::math::pi / 180.0 |
|
inline |
A soft-edge quadrupole
ds | Segment length in m |
gscale | Scaling factor for on-axis field gradient Bz in 1/m^2 |
cos_coef | cosine coefficients in Fourier expansion of on-axis magnetic field Bz |
sin_coef | sine coefficients in Fourier expansion of on-axis magnetic field Bz |
dx | horizontal translation error in m |
dy | vertical translation error in m |
rotation_degree | rotation error in the transverse plane [degrees] |
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 |
Close and deallocate all data and handles.
|
inline |
This pushes the reference particle and the linear map matrix elements for a quadrupole through the symplectic map associated with H_1 in the Hamiltonian splitting H = H_1 + H_2.
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 a quadrupole through the symplectic map associated with H_2 in the Hamiltonian splitting H = H_1 + H_2.
tau | Map step size in m | |
[in,out] | refpart | reference particle |
[in,out] | zeval | Longitudinal on-axis location in m |
|
inline |
This is a soft-edge quadrupole functor, so that a variable of this type can be used like a soft-edge quadrupole function.
x | particle position in x |
y | particle position in y |
t | particle position in t |
px | particle momentum in x |
py | particle momentum in y |
pt | particle momentum in t |
idcpu | particle global index (unused) |
refpart | reference particle |
|
inline |
This pushes the reference particle.
[in,out] | refpart | reference particle |
|
inline |
This evaluates the on-axis magnetic field Bz 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 |
amrex::ParticleReal* impactx::SoftQuadrupole::m_cos_d_data = nullptr |
non-owning pointer to host sine coefficients
amrex::ParticleReal* impactx::SoftQuadrupole::m_cos_h_data = nullptr |
number of Fourier coefficients
amrex::ParticleReal impactx::SoftQuadrupole::m_gscale |
int impactx::SoftQuadrupole::m_id |
number of map integration steps per slice
int impactx::SoftQuadrupole::m_mapsteps |
scaling factor for quad field gradient
int impactx::SoftQuadrupole::m_ncoef = 0 |
unique soft quad id used for data lookup map
amrex::ParticleReal* impactx::SoftQuadrupole::m_sin_d_data = nullptr |
non-owning pointer to device cosine coefficients
amrex::ParticleReal* impactx::SoftQuadrupole::m_sin_h_data = nullptr |
non-owning pointer to host cosine coefficients
|
staticconstexpr |