ImpactX
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
impactx Namespace Reference

Namespaces

 detail
 
 diagnostics
 
 distribution
 
 elements
 
 ImpactXParIter
 
 initialization
 
 integrators
 
 madx_to_impactx
 
 MADXParser
 
 RFCavityData
 
 SoftQuadrupoleData
 
 SoftSolenoidData
 
 spacecharge
 
 transformation
 

Classes

class  ImpactX
 
struct  CopyAndMarkNegative
 
struct  Aperture
 
struct  Buncher
 
struct  CFbend
 
struct  ChrDrift
 
struct  ChrPlasmaLens
 
struct  ChrQuad
 
struct  ChrAcc
 
struct  ConstF
 
struct  DipEdge
 
struct  Drift
 
struct  ExactDrift
 
struct  ExactSbend
 
struct  Kicker
 
struct  Multipole
 
struct  None
 
struct  NonlinearLens
 
struct  Programmable
 
struct  PRot
 
struct  Quad
 
struct  RF_field_data
 
struct  RFCavity
 
struct  Sbend
 
struct  ShortRF
 
struct  Quad_field_data
 
struct  SoftQuadrupole
 
struct  Sol_field_data
 
struct  SoftSolenoid
 
struct  Sol
 
struct  ThinDipole
 
struct  RealSoA
 
struct  IntSoA
 
class  ParIterSoA
 
class  ParConstIterSoA
 
class  ImpactXParticleContainer
 
struct  RefPart
 
struct  Config
 

Typedefs

using KnownElements = std::variant< None, Aperture, Buncher, CFbend, ChrAcc, ChrDrift, ChrPlasmaLens, ChrQuad, ConstF, diagnostics::BeamMonitor, DipEdge, Drift, ExactDrift, ExactSbend, Kicker, Multipole, NonlinearLens, Programmable, PRot, Quad, RFCavity, Sbend, ShortRF, SoftSolenoid, SoftQuadrupole, Sol, ThinDipole >
 

Enumerations

enum class  CoordSystem { s , t }
 

Functions

void read_element (std::string const &element_name, std::list< KnownElements > &m_lattice, int nslice_default, int mapsteps_default)
 
void collect_lost_particles (ImpactXParticleContainer &source)
 
std::vector< std::string > get_RealSoA_names (int num_real_comps)
 
std::vector< std::string > get_intSoA_names (int num_int_comps)
 
void Push (ImpactXParticleContainer &pc, KnownElements &element_variant, int step)
 
template<typename T_Element >
void push_all (ImpactXParticleContainer &pc, T_Element &element, [[maybe_unused]] int step, [[maybe_unused]] bool omp_parallel=true)
 

Variables

 pwd = __file__.rsplit(os.sep, 1)[0] + os.sep
 
 paths = os.environ.get("PATH", "")
 
 p_abs = os.path.abspath(os.path.expanduser(os.path.expandvars(p)))
 
 __version__ = cxx.__version__
 
 __doc__ = cxx.__doc__
 
 __license__ = cxx.__license__
 
 __author__ = cxx.__author__
 
 load_file
 
 self
 
 madx_file
 
 nslice
 

Typedef Documentation

◆ KnownElements

Enumeration Type Documentation

◆ CoordSystem

enum impactx::CoordSystem
strong
Enumerator

fixed s as the independent variable

fixed t as the independent variable

Function Documentation

◆ collect_lost_particles()

void impactx::collect_lost_particles ( ImpactXParticleContainer source)

Move lost particles into a separate container

If particles are marked as lost, by setting their id to negative, we will move them to another particle container, store their position when lost and stop pushing them in the beamline.

Parameters
sourcethe beam particle container that might loose particles

◆ get_intSoA_names()

std::vector< std::string > impactx::get_intSoA_names ( int  num_int_comps)

Get the name of each int SoA component

Parameters
num_int_compsnumber of compile-time + runtime arrays
Returns
names

◆ get_RealSoA_names()

std::vector< std::string > impactx::get_RealSoA_names ( int  num_real_comps)

Get the name of each ParticleReal SoA component

Parameters
num_real_compsnumber of compile-time + runtime arrays
Returns
names

◆ Push()

void impactx::Push ( ImpactXParticleContainer pc,
KnownElements element_variant,
int  step 
)

Push particles

Parameters
[in,out]pccontainer of the particles to push
[in,out]element_varianta single element to push the particles through
[in]stepglobal step for diagnostics

◆ push_all()

template<typename T_Element >
void impactx::push_all ( ImpactXParticleContainer pc,
T_Element &  element,
[[maybe_unused] ] int  step,
[[maybe_unused] ] bool  omp_parallel = true 
)

Push all particles in a particle container.

This element pushes first the reference particle, then all other particles. All particles are pushed independently with the same logic. Particles are relative to the reference particle.

Parameters
[in,out]pcparticle container to push
[in,out]elementthe beamline element
[in]stepglobal step for diagnostics
[in]omp_parallelallow threading via OpenMP for the particle iterator loop (note: if OMP backend is active)

◆ read_element()

void impactx::read_element ( std::string const &  element_name,
std::list< KnownElements > &  m_lattice,
int  nslice_default,
int  mapsteps_default 
)

Read a lattice element

Read a lattice element from amrex::ParmParse, initialize it and append it to m_lattice.

Parameters
[in]element_nameelement name
[in,out]m_latticethe accelerator lattice
[in]nslice_default
[in]mapsteps_default

Variable Documentation

◆ __author__

impactx.__author__ = cxx.__author__
private

◆ __doc__

impactx.__doc__ = cxx.__doc__
private

◆ __license__

impactx.__license__ = cxx.__license__
private

◆ __version__

impactx.__version__ = cxx.__version__
private

◆ load_file

impactx.load_file

◆ madx_file

impactx.madx_file

◆ nslice

impactx.nslice

◆ p_abs

impactx.p_abs = os.path.abspath(os.path.expanduser(os.path.expandvars(p)))

◆ paths

impactx.paths = os.environ.get("PATH", "")

◆ pwd

impactx.pwd = __file__.rsplit(os.sep, 1)[0] + os.sep

◆ self

impactx.self