|
ImpactX
|
#include <Programmable.H>
Public Types | |
| using | PType = ImpactXParticleContainer::ParticleType |
Public Attributes | |
| amrex::ParticleReal | m_ds = 0.0 |
| int | m_nslice = DEFAULT_nslice |
| segment length in m | |
| bool | m_threadsafe = false |
| number of slices used for the application of space charge | |
| std::function< void(ImpactXParticleContainer *, int, int)> | m_push |
| std::function< void(ImpactXParticleContainer::iterator *, RefPart &)> | m_beam_particles |
| hook for push of whole container (pc, step, period) | |
| std::function< void(RefPart &)> | m_ref_particle |
| hook for beam particles (pti, ref) | |
| std::function< void()> | m_finalize |
| hook for reference particle | |
Static Public Attributes | |
| static constexpr auto | type = "Programmable" |
| static constexpr amrex::ParticleReal | DEFAULT_ds = 0 |
| static constexpr int | DEFAULT_nslice = mixin::Thick::DEFAULT_nslice |
| Static Public Attributes inherited from impactx::elements::mixin::Named | |
| static constexpr std::nullopt_t | DEFAULT_name = std::nullopt |
| Static Public Attributes inherited from impactx::elements::mixin::LinearTransport< Programmable, false > | |
| static constexpr bool | has_linear_transport |
|
inline |
This element can be programmed
| ds | Segment length in m |
| nslice | number of slices used for the application of space charge |
| name | a user defined and not necessarily unique name of the element |
|
inline |
Return the segment length
| void impactx::elements::Programmable::finalize | ( | ) |
Close and deallocate all data and handles.
|
inline |
Number of slices used for the application of space charge
| void impactx::elements::Programmable::operator() | ( | ImpactXParticleContainer & | pc, |
| int | step, | ||
| int | period ) const |
Push all particles relative to the reference particle
| [in,out] | pc | particle container to push |
| [in] | step | global step for diagnostics |
| [in] | period | for periodic lattices, this is the current period (turn or cycle) |
| void impactx::elements::Programmable::operator() | ( | ImpactXParticleContainer::iterator & | pti, |
| RefPart & | ref_part, | ||
| bool | spin ) const |
Push all particles relative to the reference particle
| void impactx::elements::Programmable::operator() | ( | RefPart & | refpart | ) | const |
This pushes the reference particle.
| [in,out] | refpart | reference particle |
|
inline |
Reverse the element (not supported for Programmable)
|
inline |
This function returns the linear transport map.
| [in] | refpart | reference particle |
|
staticconstexpr |
|
staticconstexpr |
| std::function<void(ImpactXParticleContainer::iterator *, RefPart &)> impactx::elements::Programmable::m_beam_particles |
hook for push of whole container (pc, step, period)
| amrex::ParticleReal impactx::elements::Programmable::m_ds = 0.0 |
| std::function<void()> impactx::elements::Programmable::m_finalize |
hook for reference particle
| int impactx::elements::Programmable::m_nslice = DEFAULT_nslice |
segment length in m
| std::function<void(ImpactXParticleContainer *, int, int)> impactx::elements::Programmable::m_push |
| std::function<void(RefPart &)> impactx::elements::Programmable::m_ref_particle |
hook for beam particles (pti, ref)
| bool impactx::elements::Programmable::m_threadsafe = false |
number of slices used for the application of space charge
Allow threading via OpenMP for the particle iterator loop
This will only affect threading if the OMP backend is active.
The default value is false to do the safe thing by default. Users must opt-in their guarantee that their code is thread-safe.
|
staticconstexpr |