ImpactX
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
impactx::NonlinearLens Struct Reference

#include <NonlinearLens.H>

Inheritance diagram for impactx::NonlinearLens:
impactx::elements::BeamOptic< NonlinearLens > impactx::elements::Thin impactx::elements::Alignment impactx::elements::NoFinalize

Public Types

using PType = ImpactXParticleContainer::ParticleType
 

Public Member Functions

 NonlinearLens (amrex::ParticleReal knll, amrex::ParticleReal cnll, amrex::ParticleReal dx=0, amrex::ParticleReal dy=0, amrex::ParticleReal rotation_degree=0)
 
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
 
- Public Member Functions inherited from impactx::elements::BeamOptic< NonlinearLens >
void operator() (ImpactXParticleContainer &pc, int step)
 
void operator() (ImpactXParticleContainer::iterator &pti, RefPart &AMREX_RESTRICT ref_part)
 
- Public Member Functions inherited from impactx::elements::Thin
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator() ([[maybe_unused]] RefPart &AMREX_RESTRICT refpart) const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int nslice () const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal ds () const
 
- Public Member Functions inherited from impactx::elements::Alignment
 Alignment (amrex::ParticleReal dx, amrex::ParticleReal dy, amrex::ParticleReal rotation_degree)
 
 Alignment ()=default
 
 Alignment (Alignment const &)=default
 
Alignmentoperator= (Alignment const &)=default
 
 Alignment (Alignment &&)=default
 
Alignmentoperator= (Alignment &&rhs)=default
 
 ~Alignment ()=default
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void shift_in (amrex::ParticleReal &AMREX_RESTRICT x, amrex::ParticleReal &AMREX_RESTRICT y, amrex::ParticleReal &AMREX_RESTRICT px, amrex::ParticleReal &AMREX_RESTRICT py) const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void shift_out (amrex::ParticleReal &AMREX_RESTRICT x, amrex::ParticleReal &AMREX_RESTRICT y, amrex::ParticleReal &AMREX_RESTRICT px, amrex::ParticleReal &AMREX_RESTRICT py) const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dx () const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal dy () const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal rotation () const
 
- Public Member Functions inherited from impactx::elements::NoFinalize
void finalize ()
 

Static Public Attributes

static constexpr auto name = "NonlinearLens"
 
- Static Public Attributes inherited from impactx::elements::Alignment
static constexpr amrex::ParticleReal degree2rad = ablastr::constant::math::pi / 180.0
 

Private Attributes

amrex::ParticleReal m_knll
 
amrex::ParticleReal m_cnll
 integrated strength of the nonlinear lens (m) More...
 

Additional Inherited Members

- Public Attributes inherited from impactx::elements::Alignment
amrex::ParticleReal m_dx = 0
 
amrex::ParticleReal m_dy = 0
 horizontal translation error [m] More...
 
amrex::ParticleReal m_rotation = 0
 vertical translation error [m] More...
 

Member Typedef Documentation

◆ PType

Constructor & Destructor Documentation

◆ NonlinearLens()

impactx::NonlinearLens::NonlinearLens ( amrex::ParticleReal  knll,
amrex::ParticleReal  cnll,
amrex::ParticleReal  dx = 0,
amrex::ParticleReal  dy = 0,
amrex::ParticleReal  rotation_degree = 0 
)
inline

Single short segment of the nonlinear magnetic insert element

A thin lens associated with a single short segment of the nonlinear magnetic insert described by V. Danilov and S. Nagaitsev, PRSTAB 13, 084002 (2010), Sect. V.A. This element appears in MAD-X as type NLLENS.

Parameters
knllintegrated strength of the nonlinear lens (m)
cnlldistance of singularities from the origin (m)
dxhorizontal translation error in m
dyvertical translation error in m
rotation_degreerotation error in the transverse plane [degrees]

Member Function Documentation

◆ operator()()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::NonlinearLens::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
inline

This is a nonlinear lens functor, so that a variable of this type can be used like a nonlinear lens function.

Parameters
pParticle AoS data for positions and cpu/id
pxparticle momentum in x
pyparticle momentum in y
ptparticle momentum in t
refpartreference particle (unused)

Member Data Documentation

◆ m_cnll

amrex::ParticleReal impactx::NonlinearLens::m_cnll
private

integrated strength of the nonlinear lens (m)

◆ m_knll

amrex::ParticleReal impactx::NonlinearLens::m_knll
private

◆ name

constexpr auto impactx::NonlinearLens::name = "NonlinearLens"
staticconstexpr

The documentation for this struct was generated from the following file: