10 #ifndef IMPACTX_NONLINEARLENS_H
11 #define IMPACTX_NONLINEARLENS_H
31 static constexpr
auto name =
"NonlinearLens";
45 amrex::ParticleReal
const cnll )
51 using BeamOptic::operator();
64 PType& AMREX_RESTRICT p,
65 amrex::ParticleReal & AMREX_RESTRICT px,
66 amrex::ParticleReal & AMREX_RESTRICT py,
67 amrex::ParticleReal & AMREX_RESTRICT pt,
68 [[maybe_unused]]
RefPart const & refpart)
const {
70 using namespace amrex::literals;
76 amrex::ParticleReal
const x = p.pos(
RealAoS::x);
77 amrex::ParticleReal
const y = p.pos(
RealAoS::y);
78 amrex::ParticleReal
const t = p.pos(
RealAoS::t);
85 amrex::ParticleReal pxout = px;
86 amrex::ParticleReal pyout = py;
87 amrex::ParticleReal ptout = pt;
101 Complex carcsin = im1*zeta + croot;
110 amrex::ParticleReal dpx = kick*
dF.m_real;
111 amrex::ParticleReal dpy = -kick*
dF.m_imag;
131 using Thin::operator();
#define AMREX_FORCE_INLINE
#define AMREX_GPU_HOST_DEVICE
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real dF(const amrex::Array4< amrex::Real > &U_minus, const amrex::Array4< amrex::Real > &U_plus, int i, int j, int k, amrex::Real clight, int comp, int dir)
T_ParticleType ParticleType
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
Definition: ImpactX.cpp:33
Definition: NonlinearLens.H:30
amrex::ParticleReal m_knll
Definition: NonlinearLens.H:134
NonlinearLens(amrex::ParticleReal const knll, amrex::ParticleReal const cnll)
Definition: NonlinearLens.H:44
amrex::ParticleReal m_cnll
integrated strength of the nonlinear lens (m)
Definition: NonlinearLens.H:135
ImpactXParticleContainer::ParticleType PType
Definition: NonlinearLens.H:32
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:63
static constexpr auto name
Definition: NonlinearLens.H:31
@ x
position in x [m] (at fixed s OR fixed t)
Definition: ImpactXParticleContainer.H:42
@ y
position in y [m] (at fixed s OR fixed t)
Definition: ImpactXParticleContainer.H:43
@ t
c * time-of-flight [m] (at fixed s)
Definition: ImpactXParticleContainer.H:44
Definition: ReferenceParticle.H:30
Definition: beamoptic.H:135
Definition: nofinalize.H:22