WarpX
Loading...
Searching...
No Matches
AcceleratorLattice Class Reference

#include <AcceleratorLattice.H>

Public Member Functions

 AcceleratorLattice ()
 
void ReadLattice (std::string const &root_name, amrex::ParticleReal &z_location)
 Read in the MAD like lattice description.
 
void InitElementFinder (int lev, amrex::Real gamma_boost, const amrex::Vector< amrex::Real > &time, amrex::BoxArray const &ba, amrex::DistributionMapping const &dm)
 Initialize the element finder instance at the given level of refinement.
 
void UpdateElementFinder (int lev, const amrex::Vector< amrex::Real > &time)
 Update the element finder, needed when the simulation frame has moved relative to the lab frame.
 
LatticeElementFinderDevice GetFinderDeviceInstance (WarpXParIter const &a_pti, int a_offset, const amrex::Vector< amrex::Real > &dts) const
 Return an instance of a lattice finder associated with the grid and that can be used on the device (such as a GPU)
 

Public Attributes

int m_level
 
bool m_lattice_defined = false
 
std::unique_ptr< amrex::LayoutData< LatticeElementFinder > > m_element_finder
 
Drift h_drift
 
HardEdgedQuadrupole h_quad
 
HardEdgedPlasmaLens h_plasmalens
 

Constructor & Destructor Documentation

◆ AcceleratorLattice()

AcceleratorLattice::AcceleratorLattice ( )

Member Function Documentation

◆ GetFinderDeviceInstance()

LatticeElementFinderDevice AcceleratorLattice::GetFinderDeviceInstance ( WarpXParIter const & a_pti,
int a_offset,
const amrex::Vector< amrex::Real > & dts ) const
nodiscard

Return an instance of a lattice finder associated with the grid and that can be used on the device (such as a GPU)

Parameters
[in]a_ptithe grid where the finder is needed
[in]a_offsetthe particle offset since the finded needs information about the particles as well
[in]dtsvector containing the timestep sizes at all refinement levels

◆ InitElementFinder()

void AcceleratorLattice::InitElementFinder ( int lev,
amrex::Real gamma_boost,
const amrex::Vector< amrex::Real > & time,
amrex::BoxArray const & ba,
amrex::DistributionMapping const & dm )

Initialize the element finder instance at the given level of refinement.

Parameters
[in]levthe level of refinement
[in]gamma_boostthe Lorentz factor of the boosted frame
[in]timethe current time at all refinement levels
[in]bathe box array at the level of refinement
[in]dmthe distribution map at the level of refinement

◆ ReadLattice()

void AcceleratorLattice::ReadLattice ( std::string const & root_name,
amrex::ParticleReal & z_location )

Read in the MAD like lattice description.

Parameters
[in]root_namebase name for the input variables
[in]z_locationstarting z location for the lattice

◆ UpdateElementFinder()

void AcceleratorLattice::UpdateElementFinder ( int lev,
const amrex::Vector< amrex::Real > & time )

Update the element finder, needed when the simulation frame has moved relative to the lab frame.

Parameters
[in]levthe level of refinement
[in]timethe current time at all refinement levels

Member Data Documentation

◆ h_drift

Drift AcceleratorLattice::h_drift

◆ h_plasmalens

HardEdgedPlasmaLens AcceleratorLattice::h_plasmalens

◆ h_quad

HardEdgedQuadrupole AcceleratorLattice::h_quad

◆ m_element_finder

std::unique_ptr<amrex::LayoutData<LatticeElementFinder> > AcceleratorLattice::m_element_finder

◆ m_lattice_defined

bool AcceleratorLattice::m_lattice_defined = false

◆ m_level

int AcceleratorLattice::m_level

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