WarpX
Loading...
Searching...
No Matches
LatticeElementFinder Struct Reference

#include <LatticeElementFinder.H>

Public Member Functions

void InitElementFinder (int lev, amrex::Real gamma_boost, const amrex::Vector< amrex::Real > &time, amrex::MFIter const &a_mfi, AcceleratorLattice const &accelerator_lattice)
 Initialize the element finder at the level and grid.
 
void AllocateIndices (AcceleratorLattice const &accelerator_lattice)
 Allocate the index lookup tables for each element type.
 
void UpdateIndices (int lev, amrex::MFIter const &a_mfi, AcceleratorLattice const &accelerator_lattice, const amrex::Vector< amrex::Real > &time)
 Update the index lookup tables for each element type, filling in the values.
 
LatticeElementFinderDevice GetFinderDeviceInstance (WarpXParIter const &a_pti, int a_offset, AcceleratorLattice const &accelerator_lattice, const amrex::Vector< amrex::Real > &dts) const
 Get the device level instance associated with this instance.
 
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.
 

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< int > d_quad_indices
 
amrex::Gpu::DeviceVector< int > d_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 amrex::Vector< amrex::Real > & dts ) const
nodiscard

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
[in]dtsvector containing the timestep sizes at all refinement levels

◆ InitElementFinder()

void LatticeElementFinder::InitElementFinder ( int lev,
amrex::Real gamma_boost,
const amrex::Vector< amrex::Real > & time,
amrex::MFIter const & a_mfi,
AcceleratorLattice const & accelerator_lattice )

Initialize the element finder at the level and grid.

Parameters
[in]levthe refinement level
[in]gamma_boostthe Lorentz factor of the boosted frame
[in]timethe current time on all refinement levels
[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,
const amrex::Vector< amrex::Real > & time )

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
[in]timethe current time on all refinement levels

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: