#include <SoftSol.H>
|
| SoftSolenoid (amrex::ParticleReal ds, amrex::ParticleReal bscale, std::vector< amrex::ParticleReal > cos_coef, std::vector< amrex::ParticleReal > sin_coef, int mapsteps=1, int nslice=1) |
|
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, [[maybe_unused]] RefPart const &refpart) const |
|
AMREX_GPU_HOST AMREX_FORCE_INLINE void | operator() (RefPart &AMREX_RESTRICT refpart) const |
|
std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE | Sol_Bfield (amrex::ParticleReal const zeval) const |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | map1 (amrex::ParticleReal const tau, RefPart &refpart, [[maybe_unused]] amrex::ParticleReal &zeval) const |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | map2 (amrex::ParticleReal const tau, RefPart &refpart, amrex::ParticleReal &zeval) const |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void | map3 (amrex::ParticleReal const tau, RefPart &refpart, amrex::ParticleReal &zeval) const |
|
void | finalize () |
|
void | operator() (ImpactXParticleContainer &pc, int step) |
|
void | operator() (ImpactXParticleContainer::iterator &pti, RefPart &AMREX_RESTRICT ref_part) |
|
| Thick (amrex::ParticleReal const ds, int const nslice) |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE int | nslice () const |
|
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::ParticleReal | ds () const |
|
|
static constexpr auto | name = "SoftSolenoid" |
|
◆ PType
◆ SoftSolenoid()
impactx::SoftSolenoid::SoftSolenoid |
( |
amrex::ParticleReal |
ds, |
|
|
amrex::ParticleReal |
bscale, |
|
|
std::vector< amrex::ParticleReal > |
cos_coef, |
|
|
std::vector< amrex::ParticleReal > |
sin_coef, |
|
|
int |
mapsteps = 1 , |
|
|
int |
nslice = 1 |
|
) |
| |
|
inline |
A soft-edge solenoid
- Parameters
-
ds | Segment length in m |
bscale | Scaling factor for on-axis magnetic field Bz in 1/m |
cos_coef | cosine coefficients in Fourier expansion of on-axis magnetic field Bz |
sin_coef | sine coefficients in Fourier expansion of on-axis magnetic field Bz |
mapsteps | number of integration steps per slice used for map and reference particle push in applied fields |
nslice | number of slices used for the application of space charge |
◆ finalize()
void impactx::SoftSolenoid::finalize |
( |
| ) |
|
|
inline |
Close and deallocate all data and handles.
◆ map1()
This pushes the reference particle and the linear map matrix elements for a solenoid through the symplectic map associated with H_3 in the Hamiltonian splitting H = H_1 + H_2 + H_3.
- Parameters
-
| tau | Map step size in m |
[in,out] | refpart | reference particle |
[in,out] | zeval | Longitudinal on-axis location in m |
◆ map2()
This pushes the reference particle and the linear map matrix elements for a solenoid through the symplectic map associated with H_2 in the Hamiltonian splitting H = H_1 + H_2 + H_3.
- Parameters
-
| tau | Map step size in m |
[in,out] | refpart | reference particle |
[in,out] | zeval | Longitudinal on-axis location in m |
◆ map3()
This pushes the reference particle and the linear map matrix elements for a solenoid through the symplectic map associated with H_1 in the Hamiltonian splitting H = H_1 + H_2 + H_3.
- Parameters
-
| tau | Map step size in m |
[in,out] | refpart | reference particle |
[in,out] | zeval | Longitudinal on-axis location in m |
◆ operator()() [1/2]
This is a soft-edge solenoid functor, so that a variable of this type can be used like a soft-edge solenoid function.
- Parameters
-
p | Particle AoS data for positions and cpu/id |
px | particle momentum in x |
py | particle momentum in y |
pt | particle momentum in t |
refpart | reference particle |
◆ operator()() [2/2]
This pushes the reference particle.
- Parameters
-
[in,out] | refpart | reference particle |
◆ Sol_Bfield()
This evaluates the on-axis magnetic field Bz at a fixed location z, together with certain required integrals and derivatives. The field returned is normalized to a peak value of 1.
- Parameters
-
zeval | Longitudinal on-axis location in m |
◆ m_bscale
amrex::ParticleReal impactx::SoftSolenoid::m_bscale |
|
private |
◆ m_cos_d_data
amrex::ParticleReal* impactx::SoftSolenoid::m_cos_d_data = nullptr |
|
private |
non-owning pointer to host sine coefficients
◆ m_cos_h_data
amrex::ParticleReal* impactx::SoftSolenoid::m_cos_h_data = nullptr |
|
private |
number of Fourier coefficients
◆ m_id
int impactx::SoftSolenoid::m_id |
|
private |
number of map integration steps per slice
◆ m_mapsteps
int impactx::SoftSolenoid::m_mapsteps |
|
private |
scaling factor for solenoid Bz field
◆ m_ncoef
int impactx::SoftSolenoid::m_ncoef = 0 |
|
private |
unique soft solenoid id used for data lookup map
◆ m_sin_d_data
amrex::ParticleReal* impactx::SoftSolenoid::m_sin_d_data = nullptr |
|
private |
non-owning pointer to device cosine coefficients
◆ m_sin_h_data
amrex::ParticleReal* impactx::SoftSolenoid::m_sin_h_data = nullptr |
|
private |
non-owning pointer to host cosine coefficients
◆ name
constexpr auto impactx::SoftSolenoid::name = "SoftSolenoid" |
|
staticconstexpr |
The documentation for this struct was generated from the following file:
- /home/docs/checkouts/readthedocs.org/user_builds/impactx/checkouts/23.10/src/particles/elements/SoftSol.H