10#ifndef IMPACTX_DISTRIBUTION_KURTH6D
11#define IMPACTX_DISTRIBUTION_KURTH6D
44 amrex::ParticleReal lambdax,
45 amrex::ParticleReal lambday,
46 amrex::ParticleReal lambdat,
47 amrex::ParticleReal lambdapx,
48 amrex::ParticleReal lambdapy,
49 amrex::ParticleReal lambdapt,
50 amrex::ParticleReal muxpx=0.0,
51 amrex::ParticleReal muypy=0.0,
52 amrex::ParticleReal mutpt=0.0,
53 amrex::ParticleReal meanx=0.0,
54 amrex::ParticleReal meany=0.0,
55 amrex::ParticleReal meant=0.0,
56 amrex::ParticleReal meanpx=0.0,
57 amrex::ParticleReal meanpy=0.0,
58 amrex::ParticleReal meanpt=0.0,
59 amrex::ParticleReal dispx=0.0,
60 amrex::ParticleReal disppx=0.0,
61 amrex::ParticleReal dispy=0.0,
62 amrex::ParticleReal disppy=0.0
78 void initialize ([[maybe_unused]] amrex::ParticleReal bunch_charge, [[maybe_unused]]
RefPart const & ref)
112 using namespace amrex::literals;
116 amrex::ParticleReal
v,costheta,sintheta,phi,r;
117 amrex::ParticleReal L,
alpha,pmax,pr,beta,p1,p2;
118 amrex::ParticleReal root,a1,a2;
123 costheta = 2_prt*(costheta-0.5_prt);
124 sintheta = std::sqrt(1_prt-powi<2>(costheta));
129 r = std::pow(
v,1_prt/3_prt);
130 x = r*sintheta * std::cos(phi);
131 y = r*sintheta * std::sin(phi);
141 pmax = 1_prt - powi<2>(L/r) - powi<2>(r) + powi<2>(L);
142 pmax = std::sqrt(pmax);
143 pr = pmax * std::cos(
alpha);
147 beta = 2_prt*pi*beta;
148 p1 = L/r * std::cos(beta);
149 p2 = L/r * std::sin(beta);
152 px = pr*sintheta * std::cos(phi) + p2*costheta * std::cos(phi) - p1 * std::sin(phi);
153 py = pr*sintheta * std::sin(phi) + p2*costheta * std::sin(phi) + p1 * std::cos(phi);
154 pt = pr*costheta - p2*sintheta;
157 amrex::ParticleReal
const c = std::sqrt(5.0_prt);
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
static constexpr amrex::Real pi
constexpr T powi(T x) noexcept
@ t
fixed t as the independent variable
Definition ImpactXParticleContainer.H:38
Definition ReferenceParticle.H:31
amrex::ParticleReal m_disppy
Definition Kurth6D.H:202
amrex::ParticleReal m_meant
Definition Kurth6D.H:200
amrex::ParticleReal m_lambdaPy
Definition Kurth6D.H:198
amrex::ParticleReal m_lambdaT
Definition Kurth6D.H:197
void finalize()
Definition Kurth6D.H:87
amrex::ParticleReal m_dispx
momentum coordinates of centroid offset
Definition Kurth6D.H:202
amrex::ParticleReal m_meanx
correlation length-momentum
Definition Kurth6D.H:200
amrex::ParticleReal m_meanpy
Definition Kurth6D.H:201
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, amrex::RandomEngine const &engine) const
Definition Kurth6D.H:102
amrex::ParticleReal m_disppx
Definition Kurth6D.H:202
void initialize(amrex::ParticleReal bunch_charge, RefPart const &ref)
Definition Kurth6D.H:78
amrex::ParticleReal m_muypy
Definition Kurth6D.H:199
amrex::ParticleReal m_meany
Definition Kurth6D.H:200
amrex::ParticleReal m_muxpx
related momentum axis intercepts of the phase space ellipse
Definition Kurth6D.H:199
amrex::ParticleReal m_lambdaY
Definition Kurth6D.H:197
amrex::ParticleReal m_lambdaPx
related position axis intercepts (length) of the phase space ellipse
Definition Kurth6D.H:198
amrex::ParticleReal m_meanpt
Definition Kurth6D.H:201
Kurth6D(amrex::ParticleReal lambdax, amrex::ParticleReal lambday, amrex::ParticleReal lambdat, amrex::ParticleReal lambdapx, amrex::ParticleReal lambdapy, amrex::ParticleReal lambdapt, amrex::ParticleReal muxpx=0.0, amrex::ParticleReal muypy=0.0, amrex::ParticleReal mutpt=0.0, amrex::ParticleReal meanx=0.0, amrex::ParticleReal meany=0.0, amrex::ParticleReal meant=0.0, amrex::ParticleReal meanpx=0.0, amrex::ParticleReal meanpy=0.0, amrex::ParticleReal meanpt=0.0, amrex::ParticleReal dispx=0.0, amrex::ParticleReal disppx=0.0, amrex::ParticleReal dispy=0.0, amrex::ParticleReal disppy=0.0)
Definition Kurth6D.H:43
amrex::ParticleReal m_meanpx
spatial coordinates of centroid offset
Definition Kurth6D.H:201
amrex::ParticleReal m_mutpt
Definition Kurth6D.H:199
amrex::ParticleReal m_dispy
Definition Kurth6D.H:202
amrex::ParticleReal m_lambdaPt
Definition Kurth6D.H:198
amrex::ParticleReal m_lambdaX
Definition Kurth6D.H:197