47 static constexpr auto type =
"Sol";
72 std::optional<std::string>
name = std::nullopt
86 using BeamOptic::operator();
100 Alignment::compute_constants(refpart);
145 template<
typename T_Real=amrex::ParticleReal,
typename T_IdCpu=u
int64_t>
244 refpart.x = x + step*px;
245 refpart.y = y + step*py;
246 refpart.z = z + step*pz;
247 refpart.t =
t - step*pt;
250 refpart.s =
s + slice_ds;
268 template<
typename T_Real=amrex::ParticleReal,
typename T_IdCpu=u
int64_t>
287 T_Real lambdax = 0_prt;
288 T_Real lambday = 0_prt;
289 T_Real lambdaz = 0_prt;
308 (*this)(x, y,
t, px, py, pt, idcpu, refpart);
314 using LinearTransport::operator();
349 Rfocusing(1,1) = cos_theta;
350 Rfocusing(1,2) = sin_theta_ialpha;
351 Rfocusing(2,1) = neg_alpha_sin_theta;
352 Rfocusing(2,2) = cos_theta;
353 Rfocusing(3,3) = cos_theta;
354 Rfocusing(3,4) = sin_theta_ialpha;
355 Rfocusing(4,3) = neg_alpha_sin_theta;
356 Rfocusing(4,4) = cos_theta;
357 Rfocusing(5,6) = ds_bg2;
359 Rrotation(1,1) = cos_theta;
360 Rrotation(1,3) = sin_theta;
361 Rrotation(2,2) = cos_theta;
362 Rrotation(2,4) = sin_theta;
363 Rrotation(3,1) = -sin_theta;
364 Rrotation(3,3) = cos_theta;
365 Rrotation(4,2) = -sin_theta;
366 Rrotation(4,4) = cos_theta;
368 R = Rrotation * Rfocusing;
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
#define IMPACTX_PUSH_EXTERN_TEMPLATE(ElementType)
Definition PushAll.H:78
T_ParticleType ParticleType
amrex_particle_real ParticleReal
__host__ __device__ std::pair< double, double > sincos(double x)
constexpr T powi(T x) noexcept
@ s
fixed s as the independent variable
Definition ImpactXParticleContainer.H:37
@ 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:33
amrex::ParticleReal pt
energy, normalized by rest energy
Definition ReferenceParticle.H:42
amrex::ParticleReal gyromagnetic_anomaly
anomalous magnetic moment [unitless]
Definition ReferenceParticle.H:45
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal beta() const
Definition ReferenceParticle.H:152
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal gamma() const
Definition ReferenceParticle.H:140
amrex::ParticleReal m_ibeta
Definition Sol.H:379
amrex::ParticleReal m_ds_bg2
solenoid strength in 1/m
Definition Sol.H:378
Sol(amrex::ParticleReal ds, amrex::ParticleReal ks, amrex::ParticleReal dx=0, amrex::ParticleReal dy=0, amrex::ParticleReal rotation_degree=0, amrex::ParticleReal aperture_x=0, amrex::ParticleReal aperture_y=0, int nslice=1, std::optional< std::string > name=std::nullopt)
Definition Sol.H:63
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void spin_and_phasespace_push(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_Real &AMREX_RESTRICT sx, T_Real &AMREX_RESTRICT sy, T_Real &AMREX_RESTRICT sz, T_IdCpu &AMREX_RESTRICT idcpu, RefPart const &AMREX_RESTRICT refpart) const
Definition Sol.H:270
ImpactXParticleContainer::ParticleType PType
Definition Sol.H:48
AMREX_GPU_HOST AMREX_FORCE_INLINE Map6x6 transport_map(RefPart const &AMREX_RESTRICT refpart) const
Definition Sol.H:323
void reverse()
Definition Sol.H:83
static constexpr auto type
Definition Sol.H:47
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 Sol.H:147
amrex::ParticleReal m_rel_const
Definition Sol.H:379
amrex::ParticleReal m_neg2_theta_1pG
Definition Sol.H:379
amrex::ParticleReal m_ks
Definition Sol.H:373
amrex::ParticleReal m_cos_theta
Definition Sol.H:378
amrex::ParticleReal m_sin_G
Definition Sol.H:379
amrex::ParticleReal m_sin_theta
Definition Sol.H:378
amrex::ParticleReal m_sin_theta_ialpha
Definition Sol.H:378
amrex::ParticleReal m_neg_alpha_sin_theta
Definition Sol.H:378
void compute_constants(RefPart const &refpart)
Definition Sol.H:95
amrex::ParticleReal m_1cos_G
Definition Sol.H:379
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:436
Definition lineartransport.H:50
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
Definition pipeaperture.H:26
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
Definition pipeaperture.H:59
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal aperture_x() const
Definition pipeaperture.H:90
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal aperture_y() const
Definition pipeaperture.H:101
PipeAperture(amrex::ParticleReal aperture_x, amrex::ParticleReal aperture_y)
Definition pipeaperture.H:32
Definition spintransport.H:36
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void rotate_spin(T_Real const &AMREX_RESTRICT lambdax, T_Real const &AMREX_RESTRICT lambday, T_Real const &AMREX_RESTRICT lambdaz, T_Real &AMREX_RESTRICT sx, T_Real &AMREX_RESTRICT sy, T_Real &AMREX_RESTRICT sz) const
Definition spintransport.H:48
Thick(amrex::ParticleReal ds, int nslice)
Definition thick.H:30
amrex::ParticleReal m_ds
Definition thick.H:68
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal ds() const
Definition thick.H:53
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nslice() const
Definition thick.H:43