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

#include <ChrPlasmaLens.H>

Inheritance diagram for impactx::ChrPlasmaLens:
impactx::elements::BeamOptic< ChrPlasmaLens > impactx::elements::Thick impactx::elements::Alignment impactx::elements::NoFinalize

Public Types

using PType = ImpactXParticleContainer::ParticleType
 

Public Member Functions

 ChrPlasmaLens (amrex::ParticleReal ds, amrex::ParticleReal k, int unit, amrex::ParticleReal dx=0, amrex::ParticleReal dy=0, amrex::ParticleReal rotation_degree=0, int nslice=1)
 
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, RefPart const &refpart) const
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator() (RefPart &AMREX_RESTRICT refpart) const
 
- Public Member Functions inherited from impactx::elements::BeamOptic< ChrPlasmaLens >
void operator() (ImpactXParticleContainer &pc, int step)
 
void operator() (ImpactXParticleContainer::iterator &pti, RefPart &AMREX_RESTRICT ref_part)
 
- Public Member Functions inherited from impactx::elements::Thick
 Thick (amrex::ParticleReal ds, int nslice)
 
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 ()
 

Public Attributes

amrex::ParticleReal m_k
 
int m_unit
 focusing strength in 1/m^2 (or T/m) More...
 
- Public Attributes inherited from impactx::elements::Thick
amrex::ParticleReal m_ds
 
int m_nslice
 segment length in m More...
 
- 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...
 

Static Public Attributes

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

Member Typedef Documentation

◆ PType

Constructor & Destructor Documentation

◆ ChrPlasmaLens()

impactx::ChrPlasmaLens::ChrPlasmaLens ( amrex::ParticleReal  ds,
amrex::ParticleReal  k,
int  unit,
amrex::ParticleReal  dx = 0,
amrex::ParticleReal  dy = 0,
amrex::ParticleReal  rotation_degree = 0,
int  nslice = 1 
)
inline

An active cylindrically symmetric plasma lens with chromatic focusing

The Hamiltonian is expanded through second order in the transverse variables (x,px,y,py), with the exact pt dependence retained.

Parameters
dsSegment length in m.
kplasma lens focusing strength in m^(-2) = (azimuthal field gradient in T/m) / (rigidity in T-m) OR azimuthal magnetic field gradient in T/m (k > 0)
unitUnit specification unit = 0 focusing strength in m^(-2) unit = 1 focusing strength in T/m
dxhorizontal translation error in m
dyvertical translation error in m
rotation_degreerotation error in the transverse plane [degrees]
nslicenumber of slices used for the application of space charge

Member Function Documentation

◆ operator()() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::ChrPlasmaLens::operator() ( PType &AMREX_RESTRICT  p,
amrex::ParticleReal &AMREX_RESTRICT  px,
amrex::ParticleReal &AMREX_RESTRICT  py,
amrex::ParticleReal &AMREX_RESTRICT  pt,
RefPart const &  refpart 
) const
inline

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

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

◆ operator()() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::ChrPlasmaLens::operator() ( RefPart &AMREX_RESTRICT  refpart) const
inline

This pushes the reference particle.

Parameters
[in,out]refpartreference particle

Member Data Documentation

◆ m_k

amrex::ParticleReal impactx::ChrPlasmaLens::m_k

◆ m_unit

int impactx::ChrPlasmaLens::m_unit

focusing strength in 1/m^2 (or T/m)

◆ name

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

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