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

#include <ExactSbend.H>

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

Public Types

using PType = ImpactXParticleContainer::ParticleType
 

Public Member Functions

 ExactSbend (amrex::ParticleReal ds, amrex::ParticleReal phi, amrex::ParticleReal B, 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() (amrex::ParticleReal &AMREX_RESTRICT x, amrex::ParticleReal &AMREX_RESTRICT y, amrex::ParticleReal &AMREX_RESTRICT t, amrex::ParticleReal &AMREX_RESTRICT px, amrex::ParticleReal &AMREX_RESTRICT py, amrex::ParticleReal &AMREX_RESTRICT pt, [[maybe_unused]] uint64_t &AMREX_RESTRICT idcpu, 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< ExactSbend >
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_phi
 
amrex::ParticleReal m_B
 bend angle in radians 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 = "ExactSbend"
 
static constexpr amrex::ParticleReal degree2rad = ablastr::constant::math::pi / 180.0
 
- 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

◆ ExactSbend()

impactx::ExactSbend::ExactSbend ( amrex::ParticleReal  ds,
amrex::ParticleReal  phi,
amrex::ParticleReal  B,
amrex::ParticleReal  dx = 0,
amrex::ParticleReal  dy = 0,
amrex::ParticleReal  rotation_degree = 0,
int  nslice = 1 
)
inline

The body of an ideal sector bend, using the exact nonlinear transfer map. The map corresponds to the map described in: D. L. Bruhwiler et al, in Proc. of EPAC 98, pp. 1171-1173 (1998).

In the ultrarelativistic limit, this is equivalent to the map described in: E. Forest et al, Part. Accel. 45, pp. 65-94 (1994).

The model consists of a uniform bending field B_y with a hard edge. Pole faces are normal to the entry and exit velocity of the reference particle.

Parameters
dsSegment length in m.
phiSegment bend angle in degrees.
BMagnetic field strength in T. When B = 0 (default), the reference bending radius is defined by r0 = length / (angle in rad), corresponding to a magnetic field of B = rigidity / r0; otherwise the reference bending radius is defined by r0 = rigidity / B.
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::ExactSbend::operator() ( amrex::ParticleReal &AMREX_RESTRICT  x,
amrex::ParticleReal &AMREX_RESTRICT  y,
amrex::ParticleReal &AMREX_RESTRICT  t,
amrex::ParticleReal &AMREX_RESTRICT  px,
amrex::ParticleReal &AMREX_RESTRICT  py,
amrex::ParticleReal &AMREX_RESTRICT  pt,
[[maybe_unused] ] uint64_t &AMREX_RESTRICT  idcpu,
RefPart const &  refpart 
) const
inline

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

Parameters
xparticle position in x
yparticle position in y
tparticle position in t
pxparticle momentum in x
pyparticle momentum in y
ptparticle momentum in t
idcpuparticle global index (unused)
refpartreference particle

◆ operator()() [2/2]

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

This pushes the reference particle.

Parameters
[in,out]refpartreference particle

Member Data Documentation

◆ degree2rad

constexpr amrex::ParticleReal impactx::ExactSbend::degree2rad = ablastr::constant::math::pi / 180.0
staticconstexpr

◆ m_B

amrex::ParticleReal impactx::ExactSbend::m_B

bend angle in radians

◆ m_phi

amrex::ParticleReal impactx::ExactSbend::m_phi

◆ name

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

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