10#ifndef IMPACTX_DIPEDGE_H
11#define IMPACTX_DIPEDGE_H
43 static constexpr auto type =
"DipEdge";
65 amrex::ParticleReal psi,
66 amrex::ParticleReal rc,
67 amrex::ParticleReal g,
68 amrex::ParticleReal K2,
69 amrex::ParticleReal
dx = 0,
70 amrex::ParticleReal
dy = 0,
71 amrex::ParticleReal rotation_degree = 0,
72 std::optional<std::string>
name = std::nullopt
81 using BeamOptic::operator();
92 using namespace amrex::literals;
95 Alignment::compute_constants(refpart);
102 amrex::ParticleReal
const vf = (1.0_prt + powi<2>(sin_psi))
123 template<
typename T_Real=amrex::ParticleReal,
typename T_IdCpu=u
int64_t>
137 using namespace amrex::literals;
151 using Thin::operator();
154 using LinearTransport::operator();
165 using namespace amrex::literals;
172 amrex::ParticleReal
const R21 = std::tan(
m_psi) /
m_rc;
176 amrex::ParticleReal
const vf = (1.0_prt + powi<2>(sin_psi))
180 amrex::ParticleReal
const R43 = vf - R21;
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
T_ParticleType ParticleType
__host__ __device__ std::pair< double, double > sincos(double x)
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_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 DipEdge.H:125
static constexpr auto type
Definition DipEdge.H:43
amrex::ParticleReal m_g
bend radius in m
Definition DipEdge.H:191
amrex::ParticleReal m_R21
fringe field integral
Definition DipEdge.H:197
amrex::ParticleReal m_R43
Definition DipEdge.H:197
amrex::ParticleReal m_K2
gap parameter in m
Definition DipEdge.H:192
DipEdge(amrex::ParticleReal psi, amrex::ParticleReal rc, amrex::ParticleReal g, amrex::ParticleReal K2, amrex::ParticleReal dx=0, amrex::ParticleReal dy=0, amrex::ParticleReal rotation_degree=0, std::optional< std::string > name=std::nullopt)
Definition DipEdge.H:64
void compute_constants(RefPart const &refpart)
Definition DipEdge.H:90
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition DipEdge.H:163
amrex::ParticleReal m_psi
Definition DipEdge.H:189
amrex::ParticleReal m_rc
pole face angle in rad
Definition DipEdge.H:190
ImpactXParticleContainer::ParticleType PType
Definition DipEdge.H:44
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