10 #ifndef IMPACTX_DISTRIBUTION_KURTH4D
11 #define IMPACTX_DISTRIBUTION_KURTH4D
38 amrex::ParticleReal lambdax,
39 amrex::ParticleReal lambday,
40 amrex::ParticleReal lambdat,
41 amrex::ParticleReal lambdapx,
42 amrex::ParticleReal lambdapy,
43 amrex::ParticleReal lambdapt,
44 amrex::ParticleReal muxpx=0.0,
45 amrex::ParticleReal muypy=0.0,
46 amrex::ParticleReal mutpt=0.0
60 void initialize ([[maybe_unused]] amrex::ParticleReal bunch_charge, [[maybe_unused]]
RefPart const & ref)
85 amrex::ParticleReal & AMREX_RESTRICT x,
86 amrex::ParticleReal & AMREX_RESTRICT y,
87 amrex::ParticleReal & AMREX_RESTRICT t,
88 amrex::ParticleReal & AMREX_RESTRICT px,
89 amrex::ParticleReal & AMREX_RESTRICT py,
90 amrex::ParticleReal & AMREX_RESTRICT pt,
94 using namespace amrex::literals;
97 amrex::ParticleReal v,phi,
r,u1,u2,ln1;
98 amrex::ParticleReal
alpha,u,Lz,pmax,pr,pphi;
99 amrex::ParticleReal root,a1,a2;
111 Lz =
r*(2.0_prt*u-1.0_prt);
116 pmax = 1.0_prt -
pow((Lz/
r),2) -
pow(
r,2) +
pow(Lz,2);
118 pr = pmax*cos(
alpha);
122 px = pr*cos(phi)-pphi*sin(phi);
123 py = pr*sin(phi)+pphi*cos(phi);
127 t = 2.0_prt*(
t-0.5_prt);
131 pt = ln1*cos(2_prt*
pi*u2);
134 amrex::ParticleReal
const c =
sqrt(3.0_prt);
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
static constexpr amrex::Real pi
constexpr std::enable_if_t< std::is_floating_point_v< T >, T > pi()
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > log(const GpuComplex< T > &a_z) noexcept
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > pow(const GpuComplex< T > &a_z, const T &a_y) noexcept
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > sqrt(const GpuComplex< T > &a_z) noexcept
@ t
fixed t as the independent variable
Definition: ReferenceParticle.H:30
amrex::ParticleReal m_lambdaPt
Definition: Kurth4D.H:162
Kurth4D(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)
Definition: Kurth4D.H:37
void initialize([[maybe_unused]] amrex::ParticleReal bunch_charge, [[maybe_unused]] RefPart const &ref)
Definition: Kurth4D.H:60
amrex::ParticleReal m_lambdaY
Definition: Kurth4D.H:161
amrex::ParticleReal m_lambdaPy
Definition: Kurth4D.H:162
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: Kurth4D.H:84
amrex::ParticleReal m_lambdaT
Definition: Kurth4D.H:161
amrex::ParticleReal m_lambdaPx
related position axis intercepts (length) of the phase space ellipse
Definition: Kurth4D.H:162
amrex::ParticleReal m_muxpx
related momentum axis intercepts of the phase space ellipse
Definition: Kurth4D.H:163
amrex::ParticleReal m_mutpt
Definition: Kurth4D.H:163
amrex::ParticleReal m_lambdaX
Definition: Kurth4D.H:161
amrex::ParticleReal m_muypy
Definition: Kurth4D.H:163
void finalize()
Definition: Kurth4D.H:69