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

#include <Multipole.H>

Public Types

using PType = ImpactXParticleContainer::ParticleType
 

Public Member Functions

 Multipole (int const multipole, amrex::ParticleReal const K_normal, amrex::ParticleReal const K_skew)
 
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_DEVICE AMREX_FORCE_INLINE void operator() ([[maybe_unused]] 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 = "Multipole"
 

Private Attributes

int m_multipole
 
int m_mfactorial
 multipole index More...
 
amrex::ParticleReal m_Kn
 factorial of multipole index More...
 
amrex::ParticleReal m_Ks
 integrated normal multipole coefficient More...
 

Member Typedef Documentation

◆ PType

Constructor & Destructor Documentation

◆ Multipole()

impactx::Multipole::Multipole ( int const  multipole,
amrex::ParticleReal const  K_normal,
amrex::ParticleReal const  K_skew 
)
inline

A general thin multipole element

Parameters
multipoleindex m (m=1 dipole, m=2 quadrupole, m=3 sextupole etc.)
K_normalIntegrated normal multipole coefficient (1/meter^m)
K_skewIntegrated skew multipole coefficient (1/meter^m)

Member Function Documentation

◆ ds()

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

Return the segment length

Returns
zero, because this is a zero-length element

◆ nslice()

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

Number of slices used for the application of space charge

Returns
one, because this is a zero-length element

◆ operator()() [1/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::Multipole::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
inline

This is a multipole functor, so that a variable of this type can be used like a multipole function.

Parameters
pParticle AoS data for positions and cpu/id
pxparticle momentum in x
pyparticle momentum in y
ptparticle momentum in t
refpartreference particle (unused)

◆ operator()() [2/2]

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void impactx::Multipole::operator() ( [[maybe_unused] ] RefPart &AMREX_RESTRICT  refpart) const
inline

This pushes the reference particle.

Parameters
[in,out]refpartreference particle

Member Data Documentation

◆ m_Kn

amrex::ParticleReal impactx::Multipole::m_Kn
private

factorial of multipole index

◆ m_Ks

amrex::ParticleReal impactx::Multipole::m_Ks
private

integrated normal multipole coefficient

◆ m_mfactorial

int impactx::Multipole::m_mfactorial
private

multipole index

◆ m_multipole

int impactx::Multipole::m_multipole
private

◆ name

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

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