10#ifndef IMPACTX_TAPEREDPL_H
11#define IMPACTX_TAPEREDPL_H
43 static constexpr auto type =
"TaperedPL";
62 amrex::ParticleReal k,
63 amrex::ParticleReal taper,
65 amrex::ParticleReal
dx = 0,
66 amrex::ParticleReal
dy = 0,
67 amrex::ParticleReal rotation_degree = 0,
68 std::optional<std::string>
name = std::nullopt
77 using BeamOptic::operator();
91 template<
typename T_Real=amrex::ParticleReal,
typename T_IdCpu=u
int64_t>
104 using namespace amrex::literals;
112 amrex::ParticleReal g =
m_k;
114 g =
m_k / refpart.rigidity_Tm();
127 pxout = px - g * ( x +
m_taper*0.5_prt * (powi<2>(x) + powi<2>(y)) );
130 pyout = py - g * ( y +
m_taper * x * y );
148 using Thin::operator();
151 using LinearTransport::operator();
162 throw std::runtime_error(std::string(
type) +
": Envelope tracking is not yet implemented!");
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
T_ParticleType ParticleType
constexpr T powi(T x) noexcept
@ t
fixed t as the independent variable
Definition ImpactXParticleContainer.H:38
amrex::SmallMatrix< amrex::ParticleReal, 6, 6, amrex::Order::F, 1 > Map6x6
Definition CovarianceMatrix.H:20
static constexpr __host__ __device__ SmallMatrix< T, NRows, NCols, ORDER, StartIndex > Identity() noexcept
Definition ReferenceParticle.H:31
amrex::ParticleReal m_k
Definition TaperedPL.H:166
static constexpr auto type
Definition TaperedPL.H:43
ImpactXParticleContainer::ParticleType PType
Definition TaperedPL.H:44
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition TaperedPL.H:160
TaperedPL(amrex::ParticleReal k, amrex::ParticleReal taper, int unit, amrex::ParticleReal dx=0, amrex::ParticleReal dy=0, amrex::ParticleReal rotation_degree=0, std::optional< std::string > name=std::nullopt)
Definition TaperedPL.H:61
amrex::ParticleReal m_taper
linear focusing strength (field gradient)
Definition TaperedPL.H:167
int m_unit
horizontal taper parameter
Definition TaperedPL.H:168
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(T_Real &AMREX_RESTRICT x, T_Real &AMREX_RESTRICT y, T_Real &AMREX_RESTRICT t, T_Real &AMREX_RESTRICT px, T_Real &AMREX_RESTRICT py, T_Real &AMREX_RESTRICT pt, T_IdCpu &AMREX_RESTRICT idcpu, RefPart const &AMREX_RESTRICT refpart) const
Definition TaperedPL.H:93
Definition alignment.H:27
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
Definition alignment.H:109
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dy() const
Definition alignment.H:146
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dx() const
Definition alignment.H:136
Alignment(amrex::ParticleReal dx, amrex::ParticleReal dy, amrex::ParticleReal rotation_degree)
Definition alignment.H:36
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
Definition alignment.H:78
Definition beamoptic.H:219
Definition lineartransport.H:29
AMREX_GPU_HOST Named(std::optional< std::string > name)
Definition named.H:57
AMREX_FORCE_INLINE std::string name() const
Definition named.H:122
Definition nofinalize.H:22