|
ImpactX
|
#include <ExactCFbend.H>
Public Types | |
| using | PType = ImpactXParticleContainer::ParticleType |
Public Member Functions | |
| ExactCFbend (amrex::ParticleReal ds, std::vector< amrex::ParticleReal > k_normal, std::vector< amrex::ParticleReal > k_skew, int unit, amrex::ParticleReal dx=0, amrex::ParticleReal dy=0, amrex::ParticleReal rotation_degree=0, amrex::ParticleReal aperture_x=0, amrex::ParticleReal aperture_y=0, int int_order=2, int mapsteps=1, int nslice=1, std::optional< std::string > name=std::nullopt) | |
| void | compute_constants (RefPart const &refpart) |
| 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, uint64_t &AMREX_RESTRICT idcpu, RefPart const &AMREX_RESTRICT refpart) const |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | map1 (amrex::ParticleReal const tau, amrex::SmallVector< amrex::ParticleReal, 6, 1 > &particle, amrex::ParticleReal &zeval) const |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | map2 (amrex::ParticleReal const tau, amrex::SmallVector< amrex::ParticleReal, 6, 1 > &particle, amrex::ParticleReal &zeval) const |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | operator() (RefPart &AMREX_RESTRICT refpart) const |
| AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 | transport_map (RefPart const &AMREX_RESTRICT refpart) const |
| void | finalize () |
Public Member Functions inherited from impactx::elements::mixin::Named | |
| AMREX_GPU_HOST void | set_name (std::string const &new_name) |
| AMREX_GPU_HOST | Named (std::optional< std::string > name) |
| AMREX_GPU_HOST_DEVICE | ~Named () |
| AMREX_GPU_HOST | Named (Named const &other) |
| AMREX_GPU_HOST Named & | operator= (Named const &other) |
| AMREX_GPU_HOST_DEVICE | Named (Named &&other) noexcept |
| AMREX_GPU_HOST_DEVICE Named & | operator= (Named &&other) noexcept |
| AMREX_FORCE_INLINE std::string | name () const |
| AMREX_FORCE_INLINE bool | has_name () const |
Public Member Functions inherited from impactx::elements::mixin::BeamOptic< ExactCFbend > | |
| void | operator() (ImpactXParticleContainer &pc, int step, int period) |
| void | operator() (ImpactXParticleContainer::iterator &pti, RefPart &AMREX_RESTRICT ref_part) |
Public Member Functions inherited from impactx::elements::mixin::LinearTransport< ExactCFbend > | |
| LinearTransport ()=default | |
| LinearTransport (LinearTransport const &)=default | |
| LinearTransport (LinearTransport &&)=default | |
| LinearTransport & | operator= (LinearTransport const &)=default |
| LinearTransport & | operator= (LinearTransport &&rhs)=default |
| ~LinearTransport ()=default | |
| AMREX_GPU_HOST AMREX_FORCE_INLINE void | operator() (Map6x6 &AMREX_RESTRICT cm, RefPart const &AMREX_RESTRICT ref) const |
Public Member Functions inherited from impactx::elements::mixin::Thick | |
| 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 |
Public Member Functions inherited from impactx::elements::mixin::Alignment | |
| 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 | |
| void | compute_constants (RefPart const &refpart) |
| template<typename T_Real> | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | shift_in (T_Real &AMREX_RESTRICT x, T_Real &AMREX_RESTRICT y, T_Real &AMREX_RESTRICT px, T_Real &AMREX_RESTRICT py) const |
| template<typename T_Real> | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | shift_out (T_Real &AMREX_RESTRICT x, T_Real &AMREX_RESTRICT y, T_Real &AMREX_RESTRICT px, T_Real &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 Member Functions inherited from impactx::elements::mixin::PipeAperture | |
| PipeAperture (amrex::ParticleReal aperture_x, amrex::ParticleReal aperture_y) | |
| PipeAperture ()=default | |
| PipeAperture (PipeAperture const &)=default | |
| PipeAperture & | operator= (PipeAperture const &)=default |
| PipeAperture (PipeAperture &&)=default | |
| PipeAperture & | operator= (PipeAperture &&rhs)=default |
| ~PipeAperture ()=default | |
| template<typename T_Real = amrex::ParticleReal, typename T_IdCpu = uint64_t> | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | apply_aperture (T_Real &AMREX_RESTRICT x, T_Real &AMREX_RESTRICT y, T_IdCpu &AMREX_RESTRICT idcpu) const |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal | aperture_x () const |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal | aperture_y () const |
Public Member Functions inherited from impactx::elements::mixin::NoFinalize | |
| void | finalize () |
Public Attributes | |
| int | m_unit |
| int | m_int_order |
| unit specification for Multipole strength | |
| int | m_mapsteps |
| order used for the symplectic integration (2 or 4) | |
| int | m_id |
| number of integration steps per slice | |
| int | m_ncoef = 0 |
| unique ExactMultipole id used for data lookup map | |
| amrex::ParticleReal * | m_k_normal_h_data = nullptr |
| number of Fourier coefficients | |
| amrex::ParticleReal * | m_k_skew_h_data = nullptr |
| non-owning pointer to host cosine coefficients | |
| amrex::ParticleReal * | m_k_normal_d_data = nullptr |
| non-owning pointer to host sine coefficients | |
| amrex::ParticleReal * | m_k_skew_d_data = nullptr |
| non-owning pointer to device cosine coefficients | |
Public Attributes inherited from impactx::elements::mixin::Thick | |
| amrex::ParticleReal | m_ds |
| int | m_nslice |
| segment length in m | |
Public Attributes inherited from impactx::elements::mixin::Alignment | |
| amrex::ParticleReal | m_dx = 0 |
| amrex::ParticleReal | m_dy = 0 |
| horizontal translation error [m] | |
| amrex::ParticleReal | m_rotation = 0 |
| vertical translation error [m] | |
Public Attributes inherited from impactx::elements::mixin::PipeAperture | |
| amrex::ParticleReal | m_inv_aperture_x = 0 |
| amrex::ParticleReal | m_inv_aperture_y = 0 |
| inverse of the horizontal aperture size [1/m] | |
Static Public Attributes | |
| static constexpr auto | type = "ExactCFbend" |
Static Public Attributes inherited from impactx::elements::mixin::Alignment | |
| static constexpr amrex::ParticleReal | degree2rad = ablastr::constant::math::pi / 180.0 |
Private Attributes | |
| amrex::ParticleReal | m_slice_ds |
| non-owning pointer to device sine coefficients | |
| amrex::ParticleReal | m_ibetgam2 |
| m_ds / nslice(); | |
| amrex::ParticleReal | m_beta |
| 1 / m_betgam2 | |
| amrex::ParticleReal | m_ibeta |
| beta | |
| amrex::ParticleReal | m_brho |
| 1 / m_beta | |
| amrex::ParticleReal | m_rc |
| magnetic ridigity in T-m | |
|
inline |
A general (thick) combined-function sector dipole whose field consists of a superposition of ideal curvilinear hard-edge multipoles. The magnet is treated using the exact Hamiltonian, which includes all nonlinear kinematic effects. This is a generalization of the element CFbend, which is a linear sector bend that supports quadrupole focusing. Here, symplectic integration is used based on a splitting of the underlying Hamiltonian.
| ds | Segment length in m. |
| k_normal | Array of normal multipole coefficients (units below) |
| k_skew | Array of skew multipole coefficients (units below) |
| unit | Unit specification unit = 0 multipole strengths in units of 1/m^n (default) unit = 1 multipole strengths in units of T/m^(n-1) |
| dx | horizontal translation error in m |
| dy | vertical translation error in m |
| rotation_degree | rotation error in the transverse plane [degrees] |
| aperture_x | horizontal half-aperture in m |
| aperture_y | vertical half-aperture in m |
| int_order | order used for symplectic integration (2, 4, or 6) |
| mapsteps | number of integration steps per slice used for particle push in the applied fields |
| nslice | number of slices used for the application of space charge |
| name | a user defined and not necessarily unique name of the element |
|
inline |
Compute and cache the constants for the push.
In particular, used to pre-compute and cache variables that are independent of the individually tracked particle.
| refpart | reference particle |
|
inline |
Close and deallocate all data and handles.
|
inline |
This pushes a particle in an ExactMultipole element through the symplectic map associated with H_1 in the Hamiltonian splitting H = H_1 + H_2. This is the exact map for a sector bend.
| tau | Map step size in m | |
| [in,out] | particle | particle phase space 6-vector |
| [in,out] | zeval | Longitudinal on-axis location in m |
|
inline |
This pushes a particle in an ExactMultipole element through the symplectic map associated with H_2 in the Hamiltonian splitting H = H_1 + H_2. This is the exact kick obtained in the ideal multipole field.
| tau | Map step size in m | |
| [in,out] | particle | particle phase space 6-vector |
| [in,out] | zeval | Longitudinal on-axis location in m |
|
inline |
This is an ExactCFbend functor, so that a variable of this type can be used like an ExactCFbend function.
The
| 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 |
| refpart | reference particle (unused) |
|
inline |
This pushes the reference particle.
| [in,out] | refpart | reference particle |
|
inline |
This function returns the linear transport map.
|
private |
1 / m_betgam2
|
private |
1 / m_beta
|
private |
beta
|
private |
m_ds / nslice();
| int impactx::elements::ExactCFbend::m_id |
number of integration steps per slice
| int impactx::elements::ExactCFbend::m_int_order |
unit specification for Multipole strength
| amrex::ParticleReal* impactx::elements::ExactCFbend::m_k_normal_d_data = nullptr |
non-owning pointer to host sine coefficients
| amrex::ParticleReal* impactx::elements::ExactCFbend::m_k_normal_h_data = nullptr |
number of Fourier coefficients
| amrex::ParticleReal* impactx::elements::ExactCFbend::m_k_skew_d_data = nullptr |
non-owning pointer to device cosine coefficients
| amrex::ParticleReal* impactx::elements::ExactCFbend::m_k_skew_h_data = nullptr |
non-owning pointer to host cosine coefficients
| int impactx::elements::ExactCFbend::m_mapsteps |
order used for the symplectic integration (2 or 4)
| int impactx::elements::ExactCFbend::m_ncoef = 0 |
unique ExactMultipole id used for data lookup map
|
private |
magnetic ridigity in T-m
|
private |
non-owning pointer to device sine coefficients
| int impactx::elements::ExactCFbend::m_unit |
|
staticconstexpr |