WarpX
Public Member Functions | Public Attributes | List of all members
LatticeElementFinderDevice Struct Reference

The lattice element finder class that can be trivially copied to the device. This only has simple data and pointers. More...

#include <LatticeElementFinder.H>

Public Member Functions

void InitLatticeElementFinderDevice (WarpXParIter const &a_pti, int a_offset, AcceleratorLattice const &accelerator_lattice, LatticeElementFinder const &h_finder)
 Initialize the data needed to do the lookups. More...
 
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void operator() (const long i, amrex::ParticleReal &field_Ex, amrex::ParticleReal &field_Ey, amrex::ParticleReal &field_Ez, amrex::ParticleReal &field_Bx, amrex::ParticleReal &field_By, amrex::ParticleReal &field_Bz) const noexcept
 Gather the field for the particle from the lattice elements. More...
 

Public Attributes

amrex::Real m_zmin
 
amrex::Real m_dz
 
amrex::Real m_dt
 
amrex::ParticleReal m_gamma_boost
 
amrex::ParticleReal m_uz_boost
 
amrex::Real m_time
 
GetParticlePosition< PIdxm_get_position
 
const amrex::ParticleReal *AMREX_RESTRICT m_ux = nullptr
 
const amrex::ParticleReal *AMREX_RESTRICT m_uy = nullptr
 
const amrex::ParticleReal *AMREX_RESTRICT m_uz = nullptr
 
HardEdgedQuadrupoleDevice d_quad
 
HardEdgedPlasmaLensDevice d_plasmalens
 
int const * d_quad_indices_arr = nullptr
 
int const * d_plasmalens_indices_arr = nullptr
 

Detailed Description

The lattice element finder class that can be trivially copied to the device. This only has simple data and pointers.

Member Function Documentation

◆ InitLatticeElementFinderDevice()

void LatticeElementFinderDevice::InitLatticeElementFinderDevice ( WarpXParIter const &  a_pti,
int  a_offset,
AcceleratorLattice const &  accelerator_lattice,
LatticeElementFinder const &  h_finder 
)

Initialize the data needed to do the lookups.

Parameters
[in]a_ptispecifies the grid where the finder is defined
[in]a_offsetparticle index offset needed to access particle info
[in]accelerator_latticea reference to the accelerator lattice at the refinement level
[in]h_finderThe host level instance of the element finder that this is associated with

◆ operator()()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void LatticeElementFinderDevice::operator() ( const long  i,
amrex::ParticleReal &  field_Ex,
amrex::ParticleReal &  field_Ey,
amrex::ParticleReal &  field_Ez,
amrex::ParticleReal &  field_Bx,
amrex::ParticleReal &  field_By,
amrex::ParticleReal &  field_Bz 
) const
inlinenoexcept

Gather the field for the particle from the lattice elements.

Parameters
[in]ithe particle index
[out]field_Ex,field_Ey,field_Ez,field_Bx,field_By,field_Bzthe gathered E and B fields

Member Data Documentation

◆ d_plasmalens

HardEdgedPlasmaLensDevice LatticeElementFinderDevice::d_plasmalens

◆ d_plasmalens_indices_arr

int const* LatticeElementFinderDevice::d_plasmalens_indices_arr = nullptr

◆ d_quad

HardEdgedQuadrupoleDevice LatticeElementFinderDevice::d_quad

◆ d_quad_indices_arr

int const* LatticeElementFinderDevice::d_quad_indices_arr = nullptr

◆ m_dt

amrex::Real LatticeElementFinderDevice::m_dt

◆ m_dz

amrex::Real LatticeElementFinderDevice::m_dz

◆ m_gamma_boost

amrex::ParticleReal LatticeElementFinderDevice::m_gamma_boost

◆ m_get_position

GetParticlePosition<PIdx> LatticeElementFinderDevice::m_get_position

◆ m_time

amrex::Real LatticeElementFinderDevice::m_time

◆ m_ux

const amrex::ParticleReal* AMREX_RESTRICT LatticeElementFinderDevice::m_ux = nullptr

◆ m_uy

const amrex::ParticleReal* AMREX_RESTRICT LatticeElementFinderDevice::m_uy = nullptr

◆ m_uz

const amrex::ParticleReal* AMREX_RESTRICT LatticeElementFinderDevice::m_uz = nullptr

◆ m_uz_boost

amrex::ParticleReal LatticeElementFinderDevice::m_uz_boost

◆ m_zmin

amrex::Real LatticeElementFinderDevice::m_zmin

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