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

#include <LatticeElementFinder.H>

Public Member Functions

void InitElementFinder (int lev, amrex::MFIter const &a_mfi, AcceleratorLattice const &accelerator_lattice)
 Initialize the element finder at the level and grid. More...
 
void AllocateIndices (AcceleratorLattice const &accelerator_lattice)
 Allocate the index lookup tables for each element type. More...
 
void UpdateIndices (int lev, amrex::MFIter const &a_mfi, AcceleratorLattice const &accelerator_lattice)
 Update the index lookup tables for each element type, filling in the values. More...
 
LatticeElementFinderDevice GetFinderDeviceInstance (WarpXParIter const &a_pti, int a_offset, AcceleratorLattice const &accelerator_lattice) const
 Get the device level instance associated with this instance. More...
 
void setup_lattice_indices (amrex::Gpu::DeviceVector< amrex::ParticleReal > const &zs, amrex::Gpu::DeviceVector< amrex::ParticleReal > const &ze, amrex::Gpu::DeviceVector< int > &indices) const
 Fill in the index lookup tables This loops over the grid (in z) and finds the lattice element closest to each grid point. More...
 

Public Attributes

int m_nz
 
amrex::Real m_zmin
 
amrex::Real m_dz
 
amrex::ParticleReal m_gamma_boost
 
amrex::ParticleReal m_uz_boost
 
amrex::Real m_time
 
amrex::Gpu::DeviceVector< intd_quad_indices
 
amrex::Gpu::DeviceVector< intd_plasmalens_indices
 

Member Function Documentation

◆ AllocateIndices()

void LatticeElementFinder::AllocateIndices ( AcceleratorLattice const &  accelerator_lattice)

Allocate the index lookup tables for each element type.

Parameters
[in]accelerator_latticea reference to the accelerator lattice at the refinement level

◆ GetFinderDeviceInstance()

LatticeElementFinderDevice LatticeElementFinder::GetFinderDeviceInstance ( WarpXParIter const &  a_pti,
int  a_offset,
AcceleratorLattice const &  accelerator_lattice 
) const

Get the device level instance associated with this instance.

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

◆ InitElementFinder()

void LatticeElementFinder::InitElementFinder ( int  lev,
amrex::MFIter const &  a_mfi,
AcceleratorLattice const &  accelerator_lattice 
)

Initialize the element finder at the level and grid.

Parameters
[in]levthe refinement level
[in]a_mfispecifies the grid where the finder is defined
[in]accelerator_latticea reference to the accelerator lattice at the refinement level

◆ setup_lattice_indices()

void LatticeElementFinder::setup_lattice_indices ( amrex::Gpu::DeviceVector< amrex::ParticleReal > const &  zs,
amrex::Gpu::DeviceVector< amrex::ParticleReal > const &  ze,
amrex::Gpu::DeviceVector< int > &  indices 
) const

Fill in the index lookup tables This loops over the grid (in z) and finds the lattice element closest to each grid point.

Parameters
[in]zslist of the starts of the lattice elements
[in]zelist of the ends of the lattice elements
[in]indicesthe index lookup table to be filled in

◆ UpdateIndices()

void LatticeElementFinder::UpdateIndices ( int  lev,
amrex::MFIter const &  a_mfi,
AcceleratorLattice const &  accelerator_lattice 
)

Update the index lookup tables for each element type, filling in the values.

Parameters
[in]levthe refinement level
[in]a_mfispecifies the grid where the finder is defined
[in]accelerator_latticea reference to the accelerator lattice at the refinement level

Member Data Documentation

◆ d_plasmalens_indices

amrex::Gpu::DeviceVector<int> LatticeElementFinder::d_plasmalens_indices

◆ d_quad_indices

amrex::Gpu::DeviceVector<int> LatticeElementFinder::d_quad_indices

◆ m_dz

amrex::Real LatticeElementFinder::m_dz

◆ m_gamma_boost

amrex::ParticleReal LatticeElementFinder::m_gamma_boost

◆ m_nz

int LatticeElementFinder::m_nz

◆ m_time

amrex::Real LatticeElementFinder::m_time

◆ m_uz_boost

amrex::ParticleReal LatticeElementFinder::m_uz_boost

◆ m_zmin

amrex::Real LatticeElementFinder::m_zmin

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