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

#include <Sbend.H>

Public Types

using PType = ImpactXParticleContainer::ParticleType
 

Public Member Functions

 Sbend (amrex::ParticleReal const ds, amrex::ParticleReal const rc, int const nslice)
 
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
 
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 = "Sbend"
 

Private Attributes

amrex::ParticleReal m_ds
 
amrex::ParticleReal m_rc
 segment length in m More...
 
int m_nslice
 bend radius in m More...
 

Member Typedef Documentation

◆ PType

Constructor & Destructor Documentation

◆ Sbend()

impactx::Sbend::Sbend ( amrex::ParticleReal const  ds,
amrex::ParticleReal const  rc,
int const  nslice 
)
inline

An ideal sector bend

Parameters
dsSegment length in m.
rcRadius of curvature in m.
nslicenumber of slices used for the application of space charge

Member Function Documentation

◆ ds()

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

Return the segment length

Returns
value in meters

◆ nslice()

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

Number of slices used for the application of space charge

Returns
positive integer

◆ operator()() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::Sbend::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 sbend functor, so that a variable of this type can be used like a sbend 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::Sbend::operator() ( RefPart &AMREX_RESTRICT  refpart) const
inline

This pushes the reference particle.

Parameters
[in,out]refpartreference particle

Member Data Documentation

◆ m_ds

amrex::ParticleReal impactx::Sbend::m_ds
private

◆ m_nslice

int impactx::Sbend::m_nslice
private

bend radius in m

◆ m_rc

amrex::ParticleReal impactx::Sbend::m_rc
private

segment length in m

◆ name

constexpr auto impactx::Sbend::name = "Sbend"
static

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