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

#include <NonlinearLens.H>

Public Types

using PType = ImpactXParticleContainer::ParticleType
 

Public Member Functions

 NonlinearLens (amrex::ParticleReal const knll, amrex::ParticleReal const cnll)
 
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
 
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
 

Static Public Attributes

static constexpr auto name = "NonlinearLens"
 

Private Attributes

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

Member Typedef Documentation

◆ PType

Constructor & Destructor Documentation

◆ NonlinearLens()

impactx::NonlinearLens::NonlinearLens ( amrex::ParticleReal const  knll,
amrex::ParticleReal const  cnll 
)
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)

Member Function Documentation

◆ ds()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal impactx::NonlinearLens::ds ( ) const
inline

Return the segment length

Returns
zero, because this is a zero-length element

◆ nslice()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int impactx::NonlinearLens::nslice ( ) const
inline

Number of slices used for the application of space charge

Returns
one, because this is a zero-length element

◆ operator()() [1/2]

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)

◆ operator()() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::NonlinearLens::operator() ( [[maybe_unused] ] RefPart &AMREX_RESTRICT  refpart) const
inline

This pushes the reference particle.

Parameters
[in,out]refpartreference particle

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"
static

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