#include <Programmable.H>
|
| static constexpr auto | type = "Programmable" |
| |
◆ PType
◆ Programmable()
| impactx::elements::Programmable::Programmable |
( |
amrex::ParticleReal | ds = 0.0, |
|
|
int | nslice = 1, |
|
|
std::optional< std::string > | name = std::nullopt ) |
|
inline |
This element can be programmed
- Parameters
-
| 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 |
◆ ds()
Return the segment length
- Returns
- value in meters
◆ finalize()
| void impactx::elements::Programmable::finalize |
( |
| ) |
|
Close and deallocate all data and handles.
◆ nslice()
Number of slices used for the application of space charge
- Returns
- positive integer
◆ operator()() [1/3]
Push all particles relative to the reference particle
- Parameters
-
| [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) |
◆ operator()() [2/3]
Push all particles relative to the reference particle
◆ operator()() [3/3]
| void impactx::elements::Programmable::operator() |
( |
RefPart & | refpart | ) |
const |
This pushes the reference particle.
- Parameters
-
| [in,out] | refpart | reference particle |
◆ transport_map()
This function returns the linear transport map.
- Parameters
-
| [in] | refpart | reference particle |
- Returns
- 6x6 transport matrix
◆ m_beam_particles
hook for push of whole container (pc, step, period)
◆ m_ds
| amrex::ParticleReal impactx::elements::Programmable::m_ds = 0.0 |
◆ m_finalize
| std::function<void()> impactx::elements::Programmable::m_finalize |
hook for reference particle
◆ m_nslice
| int impactx::elements::Programmable::m_nslice = 1 |
◆ m_push
◆ m_ref_particle
| std::function<void(RefPart &)> impactx::elements::Programmable::m_ref_particle |
◆ m_threadsafe
| 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.
◆ type
| auto impactx::elements::Programmable::type = "Programmable" |
|
staticconstexpr |
The documentation for this struct was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/impactx/checkouts/1182/src/elements/Programmable.H
- /home/docs/checkouts/readthedocs.org/user_builds/impactx/checkouts/1182/src/elements/Programmable.cpp