ImpactX
Public Types | Public Member Functions | Private Attributes | List of all members
impactx::ImpactXParticleContainer Class Reference

#include <ImpactXParticleContainer.H>

Inheritance diagram for impactx::ImpactXParticleContainer:
amrex::ParticleContainer_impl< class, T_NArrayReal, T_NArrayInt, Allocator, class > amrex::ParticleContainerBase

Public Types

using iterator = impactx::ParIterSoA
 amrex iterator for particle boxes More...
 
using const_iterator = impactx::ParConstIterSoA
 amrex constant iterator for particle boxes (read-only) More...
 
- Public Types inherited from amrex::ParticleContainer_impl< class, T_NArrayReal, T_NArrayInt, Allocator, class >
typedef T_ParticleType ParticleType
 
typedef typename ParticleType::ConstType ConstParticleType
 
typedef T_CellAssignor CellAssignor
 
typedef Allocator< T > AllocatorType
 
typedef Particle< NStructReal+NArrayReal, NStructInt+NArrayIntSuperParticleType
 
typedef typename Particle< NStructReal, NStructInt >::RealType RealType
 
typedef ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignorParticleContainerType
 
typedef ParticleTile< ParticleType, NArrayReal, NArrayInt, Allocator > ParticleTileType
 
typedef ParticleInitType< NStructReal, NStructInt, NArrayReal, NArrayIntParticleInitData
 
typedef std::map< std::pair< int, int >, ParticleTileTypeParticleLevel
 
typedef typename ParticleTileType::AoS AoS
 
typedef typename ParticleTileType::SoA SoA
 
typedef typename SoA::RealVector RealVector
 
typedef typename SoA::IntVector IntVector
 
typedef typename AoS::ParticleVector ParticleVector
 
typedef Gpu::DeviceVector< char > CharVector
 
typedef ParIter_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignorParIterType
 
typedef ParConstIter_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignorParConstIterType
 
typedef amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, NewAllocator > ContainerLike
 

Public Member Functions

 ImpactXParticleContainer (initialization::AmrCoreData *amr_core)
 Construct a new particle container. More...
 
virtual ~ImpactXParticleContainer ()=default
 Destruct a particle container. More...
 
void AddNParticles (amrex::Gpu::DeviceVector< amrex::ParticleReal > const &x, amrex::Gpu::DeviceVector< amrex::ParticleReal > const &y, amrex::Gpu::DeviceVector< amrex::ParticleReal > const &t, amrex::Gpu::DeviceVector< amrex::ParticleReal > const &px, amrex::Gpu::DeviceVector< amrex::ParticleReal > const &py, amrex::Gpu::DeviceVector< amrex::ParticleReal > const &pt, amrex::ParticleReal qm, amrex::ParticleReal bchchg)
 
void SetLostParticleContainer (ImpactXParticleContainer *lost_pc)
 
ImpactXParticleContainerGetLostParticleContainer ()
 
void SetRefParticle (RefPart const &refpart)
 
RefPartGetRefParticle ()
 
RefPart const & GetRefParticle () const
 
void SetRefParticleEdge ()
 
int GetParticleShape () const
 
void SetParticleShape ()
 
void SetParticleShape (int order)
 
std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > MinAndMaxPositions ()
 
std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > MeanAndStdPositions ()
 
void DepositCharge (std::unordered_map< int, amrex::MultiFab > &rho, amrex::Vector< amrex::IntVect > const &ref_ratio)
 
std::vector< std::string > RealSoA_names () const
 
std::vector< std::string > intSoA_names () const
 
CoordSystem GetCoordSystem () const
 
void SetCoordSystem (CoordSystem coord_system)
 
- Public Member Functions inherited from amrex::ParticleContainer_impl< class, T_NArrayReal, T_NArrayInt, Allocator, class >
 ParticleContainer_impl ()
 
 ParticleContainer_impl (ParGDBBase *gdb)
 
 ParticleContainer_impl (const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
 
 ParticleContainer_impl (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 
 ParticleContainer_impl (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 
 ~ParticleContainer_impl () override=default
 
 ParticleContainer_impl (const ParticleContainer_impl &)=delete
 
ParticleContainer_imploperator= (const ParticleContainer_impl &)=delete
 
 ParticleContainer_impl (ParticleContainer_impl &&) noexcept=default
 
ParticleContainer_imploperator= (ParticleContainer_impl &&) noexcept=default
 
void Define (ParGDBBase *gdb)
 
void Define (const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
 
void Define (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 
void Define (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 
int numLocalTilesAtLevel (int lev) const
 
void reserveData () override
 
void resizeData () override
 
void InitFromAsciiFile (const std::string &file, int extradata, const IntVect *Nrep=nullptr)
 
void InitFromBinaryFile (const std::string &file, int extradata)
 
void InitFromBinaryMetaFile (const std::string &file, int extradata)
 
void InitRandom (Long icount, ULong iseed, const ParticleInitData &pdata, bool serialize=false, RealBox bx=RealBox())
 
void InitRandomPerBox (Long icount, ULong iseed, const ParticleInitData &pdata)
 
void InitOnePerCell (Real x_off, Real y_off, Real z_off, const ParticleInitData &pdata)
 
void InitNRandomPerCell (int n_per_cell, const ParticleInitData &pdata)
 
void Increment (MultiFab &mf, int level)
 
Long IncrementWithTotal (MultiFab &mf, int level, bool local=false)
 
void Redistribute (int lev_min=0, int lev_max=-1, int nGrow=0, int local=0, bool remove_negative=true)
 
void ReorderParticles (int lev, const MFIter &mfi, const index_type *permutations)
 
void SortParticlesForDeposition (IntVect idx_type)
 
void SortParticlesByCell ()
 
void SortParticlesByBin (IntVect bin_size)
 
bool OK (int lev_min=0, int lev_max=-1, int nGrow=0) const
 
std::array< Long, 3 > ByteSpread () const
 
std::array< Long, 3 > PrintCapacity () const
 
void ShrinkToFit ()
 
Long NumberOfParticlesAtLevel (int level, bool only_valid=true, bool only_local=false) const
 
Vector< Long > NumberOfParticlesInGrid (int level, bool only_valid=true, bool only_local=false) const
 
Long TotalNumberOfParticles (bool only_valid=true, bool only_local=false) const
 
void RemoveParticlesAtLevel (int level)
 
void RemoveParticlesNotAtFinestLevel ()
 
void CreateVirtualParticles (int level, AoS &virts) const
 
void CreateGhostParticles (int level, int ngrow, AoS &ghosts) const
 
void AddParticlesAtLevel (AoS &particles, int level, int nGrow=0)
 
void CreateVirtualParticles (int level, ParticleTileType &virts) const
 
void CreateGhostParticles (int level, int ngrow, ParticleTileType &ghosts) const
 
void AddParticlesAtLevel (ParticleTileType &particles, int level, int nGrow=0)
 
void clearParticles ()
 
void copyParticles (const PCType &other, bool local=false)
 
void addParticles (const PCType &other, bool local=false)
 
void copyParticles (const PCType &other, F &&f, bool local=false)
 
void addParticles (const PCType &other, F &&f, bool local=false)
 
void WriteParticleRealData (void *data, size_t size, std::ostream &os) const
 
void ReadParticleRealData (void *data, size_t size, std::istream &is)
 
void Checkpoint (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names=Vector< std::string >(), const Vector< std::string > &int_comp_names=Vector< std::string >()) const
 
void Checkpoint (const std::string &dir, const std::string &name, bool is_checkpoint, const Vector< std::string > &real_comp_names=Vector< std::string >(), const Vector< std::string > &int_comp_names=Vector< std::string >()) const
 
void WriteBinaryParticleData (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f, bool is_checkpoint=false) const
 
void CheckpointPre ()
 
void CheckpointPost ()
 
void Restart (const std::string &dir, const std::string &file)
 
void Restart (const std::string &dir, const std::string &file, bool is_checkpoint)
 
void WritePlotFile (const std::string &dir, const std::string &name) const
 
void WritePlotFile (const std::string &dir, const std::string &name, F &&f) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, F &&f) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, F &&f) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const
 
void WritePlotFilePre ()
 
void WritePlotFilePost ()
 
void WriteAsciiFile (const std::string &file)
 
const Vector< ParticleLevel > & GetParticles () const
 
Vector< ParticleLevel > & GetParticles ()
 
const ParticleLevelGetParticles (int lev) const
 
ParticleLevelGetParticles (int lev)
 
const ParticleTileTypeParticlesAt (int lev, int grid, int tile) const
 
ParticleTileTypeParticlesAt (int lev, int grid, int tile)
 
const ParticleTileTypeParticlesAt (int lev, const Iterator &iter) const
 
ParticleTileTypeParticlesAt (int lev, const Iterator &iter)
 
ParticleTileTypeDefineAndReturnParticleTile (int lev, int grid, int tile)
 
ParticleTileTypeDefineAndReturnParticleTile (int lev, const Iterator &iter)
 
void AssignDensity (int rho_index, Vector< std::unique_ptr< MultiFab > > &mf_to_be_filled, int lev_min, int ncomp, int finest_level, int ngrow=2) const
 
void AssignCellDensitySingleLevel (int rho_index, MultiFab &mf, int level, int ncomp=1, int particle_lvl_offset=0) const
 
IntVect Index (const P &p, int lev) const
 
ParticleLocData Reset (ParticleType &prt, bool update, bool verbose=true, ParticleLocData pld=ParticleLocData()) const
 
bool PeriodicShift (P &p) const
 
void SetLevelDirectoriesCreated (bool tf)
 
bool GetLevelDirectoriesCreated () const
 
void SetUsePrePost (bool tf) const
 
bool GetUsePrePost () const
 
int GetMaxNextIDPrePost () const
 
Long GetNParticlesPrePost () const
 
void SetUseUnlink (bool tf) const
 
bool GetUseUnlink () const
 
void RedistributeCPU (int lev_min=0, int lev_max=-1, int nGrow=0, int local=0, bool remove_negative=true)
 
void RedistributeGPU (int lev_min=0, int lev_max=-1, int nGrow=0, int local=0, bool remove_negative=true)
 
Long superParticleSize () const
 
void AddRealComp (T communicate=true)
 
void AddIntComp (T communicate=true)
 
int NumRuntimeRealComps () const
 
int NumRuntimeIntComps () const
 
int NumRealComps () const
 
int NumIntComps () const
 
void ResizeRuntimeRealComp (int new_size, bool communicate)
 
void ResizeRuntimeIntComp (int new_size, bool communicate)
 
ContainerLike< NewAllocator > make_alike () const
 
void WriteParticles (int level, std::ofstream &ofs, int fnum, Vector< int > &which, Vector< int > &count, Vector< Long > &where, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::map< std::pair< int, int >, IntVector >> &particle_io_flags, bool is_checkpoint) const
 
IntVect Index (const P &p, int lev) const
 
bool Where (const P &p, ParticleLocData &pld, int lev_min, int lev_max, int nGrow, int local_grid) const
 
bool EnforcePeriodicWhere (P &p, ParticleLocData &pld, int lev_min, int lev_max, int local_grid) const
 
bool PeriodicShift (P &p) const
 
void locateParticle (P &p, ParticleLocData &pld, int lev_min, int lev_max, int nGrow, int local_grid) const
 
void copyParticles (const PCType &other, bool local)
 
void addParticles (const PCType &other, bool local)
 
void copyParticles (const PCType &other, F &&f, bool local)
 
void addParticles (const PCType &other, F &&f, bool local)
 
void ReorderParticles (int lev, const MFIter &mfi, const index_type *permutations)
 
void WritePlotFile (const std::string &dir, const std::string &name, F &&f) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, F &&f) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, F &&f) const
 
void WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const
 
void WriteBinaryParticleData (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f, bool is_checkpoint) const
 
void ReadParticles (int cnt, int grd, int lev, std::ifstream &ifs, int finest_level_in_file, bool convert_ids)
 
- Public Member Functions inherited from amrex::ParticleContainerBase
 ParticleContainerBase ()=default
 
 ParticleContainerBase (ParGDBBase *gdb)
 
 ParticleContainerBase (const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
 
 ParticleContainerBase (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 
 ParticleContainerBase (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 
virtual ~ParticleContainerBase ()=default
 
 ParticleContainerBase (const ParticleContainerBase &)=delete
 
ParticleContainerBaseoperator= (const ParticleContainerBase &)=delete
 
 ParticleContainerBase (ParticleContainerBase &&)=default
 
ParticleContainerBaseoperator= (ParticleContainerBase &&)=default
 
void Define (ParGDBBase *gdb)
 
void Define (const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
 
void Define (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 
void Define (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 
bool isDefined () const
 
void RedefineDummyMF (int lev)
 
MFIter MakeMFIter (int lev, const MFItInfo &info) const
 
MFIter MakeMFIter (int lev) const
 
MFIter MakeMFIter (int lev, bool tile) const
 
void SetParGDB (const Geometry &geom, const DistributionMapping &dmap, const BoxArray &ba)
 
void SetParGDB (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< IntVect > &rr)
 
void SetParGDB (const Vector< Geometry > &geom, const Vector< DistributionMapping > &dmap, const Vector< BoxArray > &ba, const Vector< int > &rr)
 
void SetParticleBoxArray (int lev, BoxArray new_ba)
 
void SetParticleDistributionMap (int lev, DistributionMapping new_dmap)
 
void SetParticleGeometry (int lev, Geometry new_geom)
 
const BoxArrayParticleBoxArray (int lev) const
 
const DistributionMappingParticleDistributionMap (int lev) const
 
const GeometryGeom (int lev) const
 
const GeometryParticleGeom (int lev) const
 
int finestLevel () const
 
int maxLevel () const
 
int numLevels () const
 
const ParGDBBaseGetParGDB () const
 
ParGDBBaseGetParGDB ()
 
int Verbose () const
 
void SetVerbose (int verbose)
 
const ParticleBufferMapBufferMap () const
 
Vector< intNeighborProcs (int ngrow) const
 
bool OnSameGrids (int level, const MF &mf) const
 

Private Attributes

RefPart m_refpart
 the reference particle for the beam in the particle container More...
 
std::optional< intm_particle_shape
 the particle shape More...
 
ImpactXParticleContainerm_particles_lost = nullptr
 a non-owning reference to lost particles, i.e., due to apertures More...
 
CoordSystem m_coordsystem = CoordSystem::s
 the current coordinate system of particles in this container More...
 

Additional Inherited Members

- Static Public Member Functions inherited from amrex::ParticleContainerBase
static const std::string & CheckpointVersion ()
 
static const std::string & PlotfileVersion ()
 
static const std::string & DataPrefix ()
 
static int MaxReaders ()
 
static Long MaxParticlesPerRead ()
 
static const std::string & AggregationType ()
 
static int AggregationBuffer ()
 
- Public Attributes inherited from amrex::ParticleContainer_impl< class, T_NArrayReal, T_NArrayInt, Allocator, class >
RealDescriptor ParticleRealDescriptor
 
Vector< inth_redistribute_real_comp
 
Vector< inth_redistribute_int_comp
 
bool levelDirectoriesCreated
 
bool usePrePost
 
bool doUnlink
 
int maxnextidPrePost
 
int nOutFilesPrePost
 
Long nparticlesPrePost
 
Vector< Long > nParticlesAtLevelPrePost
 
Vector< Vector< int > > whichPrePost
 
Vector< Vector< int > > countPrePost
 
Vector< Vector< Long > > wherePrePost
 
std::string HdrFileNamePrePost
 
Vector< std::string > filePrefixPrePost
 
- Public Attributes inherited from amrex::ParticleContainerBase
AmrParticleLocator< DenseBins< Box > > m_particle_locator
 
- Static Public Attributes inherited from amrex::ParticleContainer_impl< class, T_NArrayReal, T_NArrayInt, Allocator, class >
static constexpr int NStructReal
 
static constexpr int NStructInt
 
static constexpr int NArrayReal
 
static constexpr int NArrayInt
 
- Static Public Attributes inherited from amrex::ParticleContainerBase
static AMREX_EXPORT bool do_tiling
 
static AMREX_EXPORT IntVect tile_size
 
static AMREX_EXPORT bool memEfficientSort
 
- Protected Member Functions inherited from amrex::ParticleContainer_impl< class, T_NArrayReal, T_NArrayInt, Allocator, class >
bool Where (const P &prt, ParticleLocData &pld, int lev_min=0, int lev_max=-1, int nGrow=0, int local_grid=-1) const
 
bool EnforcePeriodicWhere (P &prt, ParticleLocData &pld, int lev_min=0, int lev_max=-1, int local_grid=-1) const
 
void ReadParticles (int cnt, int grd, int lev, std::ifstream &ifs, int finest_level_in_file, bool convert_ids)
 
void SetParticleSize ()
 
- Protected Member Functions inherited from amrex::ParticleContainerBase
void BuildRedistributeMask (int lev, int nghost=1) const
 
void defineBufferMap () const
 
- Protected Attributes inherited from amrex::ParticleContainer_impl< class, T_NArrayReal, T_NArrayInt, Allocator, class >
DenseBins< typename ParticleTileType::ParticleTileDataTypem_bins
 
- Protected Attributes inherited from amrex::ParticleContainerBase
int m_verbose
 
std::unique_ptr< ParGDBm_gdb_object
 
ParGDBBasem_gdb
 
Vector< std::unique_ptr< MultiFab > > m_dummy_mf
 
std::unique_ptr< iMultiFabredistribute_mask_ptr
 
int redistribute_mask_nghost
 
amrex::Vector< intneighbor_procs
 
ParticleBufferMap m_buffer_map
 

Detailed Description

Beam Particles in ImpactX

This class stores particles, distributed over MPI ranks.

Member Typedef Documentation

◆ const_iterator

amrex constant iterator for particle boxes (read-only)

◆ iterator

amrex iterator for particle boxes

Constructor & Destructor Documentation

◆ ImpactXParticleContainer()

impactx::ImpactXParticleContainer::ImpactXParticleContainer ( initialization::AmrCoreData amr_core)

Construct a new particle container.

◆ ~ImpactXParticleContainer()

virtual impactx::ImpactXParticleContainer::~ImpactXParticleContainer ( )
virtualdefault

Destruct a particle container.

Member Function Documentation

◆ AddNParticles()

void impactx::ImpactXParticleContainer::AddNParticles ( amrex::Gpu::DeviceVector< amrex::ParticleReal > const &  x,
amrex::Gpu::DeviceVector< amrex::ParticleReal > const &  y,
amrex::Gpu::DeviceVector< amrex::ParticleReal > const &  t,
amrex::Gpu::DeviceVector< amrex::ParticleReal > const &  px,
amrex::Gpu::DeviceVector< amrex::ParticleReal > const &  py,
amrex::Gpu::DeviceVector< amrex::ParticleReal > const &  pt,
amrex::ParticleReal  qm,
amrex::ParticleReal  bchchg 
)

Add new particles to the container for fixed s.

Note: This can only be used after the initialization (grids) have been created, meaning after the call to AmrCore::InitFromScratch or AmrCore::InitFromCheckpoint has been made in the ImpactX class.

Parameters
xpositions in x
ypositions in y
tpositions as time-of-flight in c*t
pxmomentum in x
pymomentum in y
ptmomentum in t
qmcharge over mass in 1/eV
bchchgtotal charge within a bunch in C

◆ DepositCharge()

void impactx::ImpactXParticleContainer::DepositCharge ( std::unordered_map< int, amrex::MultiFab > &  rho,
amrex::Vector< amrex::IntVect > const &  ref_ratio 
)

Deposit the charge of the particles onto a grid

This resets the values in rho to zero and then deposits the particle charge. In MPI-parallel contexts, this also performs a communication of boundary regions to sum neighboring contributions.

Parameters
rhocharge grid per level to deposit on
ref_ratiomesh refinement ratios between levels

◆ GetCoordSystem()

CoordSystem impactx::ImpactXParticleContainer::GetCoordSystem ( ) const

Get the current coordinate system of particles in this container

◆ GetLostParticleContainer()

ImpactXParticleContainer * impactx::ImpactXParticleContainer::GetLostParticleContainer ( )

◆ GetParticleShape()

int impactx::ImpactXParticleContainer::GetParticleShape ( ) const
inline

Get particle shape

◆ GetRefParticle() [1/2]

RefPart & impactx::ImpactXParticleContainer::GetRefParticle ( )

Get reference particle attributes

Returns
refpart

◆ GetRefParticle() [2/2]

RefPart const & impactx::ImpactXParticleContainer::GetRefParticle ( ) const

Get a copy to the reference particle attributes

Returns
refpart

◆ intSoA_names()

std::vector< std::string > impactx::ImpactXParticleContainer::intSoA_names ( ) const

Get the name of each int SoA component

◆ MeanAndStdPositions()

std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > impactx::ImpactXParticleContainer::MeanAndStdPositions ( )

Compute the mean and std of the particle position in each dimension

Returns
x_mean, x_std, y_mean, y_std, z_mean, z_std

◆ MinAndMaxPositions()

std::tuple< amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal, amrex::ParticleReal > impactx::ImpactXParticleContainer::MinAndMaxPositions ( )

Compute the min and max of the particle position in each dimension

Returns
x_min, y_min, z_min, x_max, y_max, z_max

◆ RealSoA_names()

std::vector< std::string > impactx::ImpactXParticleContainer::RealSoA_names ( ) const

Get the name of each ParticleReal SoA component

◆ SetCoordSystem()

void impactx::ImpactXParticleContainer::SetCoordSystem ( CoordSystem  coord_system)

Set the current coordinate system of particles in this container

Parameters
coord_systemthe new coordinate system the beam particles are in

◆ SetLostParticleContainer()

void impactx::ImpactXParticleContainer::SetLostParticleContainer ( ImpactXParticleContainer lost_pc)

Register storage for lost particles

Parameters
lost_pcparticle container for lost particles

◆ SetParticleShape() [1/2]

void impactx::ImpactXParticleContainer::SetParticleShape ( )

Set Particle Shape from amrex::ParmParse inputs

Note: this can only be called once. All later calls are a logic error. The reason for that is that subsequent calls would need to change the guard size of all our MultiFabs, which is not implemented.

◆ SetParticleShape() [2/2]

void impactx::ImpactXParticleContainer::SetParticleShape ( int  order)

Set Particle Shape order

Note: this can only be called once. All later calls are a logic error. The reason for that is that subsequent calls would need to change the guard size of all our MultiFabs, which is not implemented.

Parameters
orderthe order of the particle shape

◆ SetRefParticle()

void impactx::ImpactXParticleContainer::SetRefParticle ( RefPart const &  refpart)

Set reference particle attributes

Parameters
refpartreference particle

◆ SetRefParticleEdge()

void impactx::ImpactXParticleContainer::SetRefParticleEdge ( )

Update reference particle element edge

Member Data Documentation

◆ m_coordsystem

CoordSystem impactx::ImpactXParticleContainer::m_coordsystem = CoordSystem::s
private

the current coordinate system of particles in this container

◆ m_particle_shape

std::optional<int> impactx::ImpactXParticleContainer::m_particle_shape
private

the particle shape

◆ m_particles_lost

ImpactXParticleContainer* impactx::ImpactXParticleContainer::m_particles_lost = nullptr
private

a non-owning reference to lost particles, i.e., due to apertures

◆ m_refpart

RefPart impactx::ImpactXParticleContainer::m_refpart
private

the reference particle for the beam in the particle container


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