10 #ifndef IMPACTX_NONLINEARLENS_H 11 #define IMPACTX_NONLINEARLENS_H 29 static constexpr
auto name =
"NonlinearLens";
43 amrex::ParticleReal
const cnll )
49 using BeamOptic::operator();
62 PType& AMREX_RESTRICT p,
63 amrex::ParticleReal & AMREX_RESTRICT px,
64 amrex::ParticleReal & AMREX_RESTRICT py,
65 amrex::ParticleReal & AMREX_RESTRICT pt,
66 [[maybe_unused]]
RefPart const & refpart)
const {
68 using namespace amrex::literals;
74 amrex::ParticleReal
const x = p.pos(0);
75 amrex::ParticleReal
const y = p.pos(1);
76 amrex::ParticleReal
const t = p.pos(2);
83 amrex::ParticleReal pxout = px;
84 amrex::ParticleReal pyout = py;
85 amrex::ParticleReal ptout = pt;
98 Complex carcsin = im1*zeta + croot;
107 amrex::ParticleReal dpx = kick*dF.m_real;
108 amrex::ParticleReal dpy = -kick*dF.m_imag;
128 using Thin::operator();
137 #endif // IMPACTX_NONLINEARLENS_H
static constexpr auto name
Definition: NonlinearLens.H:29
Definition: ImpactX.cpp:31
NonlinearLens(amrex::ParticleReal const knll, amrex::ParticleReal const cnll)
Definition: NonlinearLens.H:42
amrex::ParticleReal m_cnll
integrated strength of the nonlinear lens (m)
Definition: NonlinearLens.H:132
Definition: beamoptic.H:131
Definition: NonlinearLens.H:25
#define AMREX_FORCE_INLINE
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator()(PType &AMREX_RESTRICT p, amrex::ParticleReal &AMREX_RESTRICT px, amrex::ParticleReal &AMREX_RESTRICT py, amrex::ParticleReal &AMREX_RESTRICT pt, [[maybe_unused]] RefPart const &refpart) const
Definition: NonlinearLens.H:61
#define AMREX_GPU_HOST_DEVICE
Particle< NStructReal, NStructInt > ParticleType
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > log(const GpuComplex< T > &a_z) noexcept
Definition: ReferenceParticle.H:29
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > pow(const GpuComplex< T > &a_z, const T &a_y) noexcept
amrex::ParticleReal m_knll
Definition: NonlinearLens.H:131
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE GpuComplex< T > sqrt(const GpuComplex< T > &a_z) noexcept