OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
PartBunch< T, Dim > Class Template Reference

#include <PartBunch.h>

Inherits ippl::PicManager< T, Dim, ParticleContainer< T, Dim >, FieldContainer< T, Dim >, LoadBalancer< T, Dim > >.

Collaboration diagram for PartBunch< T, Dim >:
Collaboration graph

Public Types

using ParticleContainer_t = ParticleContainer< T, Dim >
 
using FieldContainer_t = FieldContainer< T, Dim >
 
using BinnedFieldSolver_t = BinnedFieldSolver< T, Dim >
 
using LoadBalancer_t = LoadBalancer< T, Dim >
 
using Base = ippl::ParticleBase< ippl::ParticleSpatialLayout< T, Dim >, Kokkos::DefaultExecutionSpace::memory_space >
 
using CoordinateSelector_t = typename ParticleBinning::CoordinateSelector< ParticleContainer_t >
 
using GammaSelector_t = typename ParticleBinning::GammaSelector< ParticleContainer_t >
 
using AdaptBins_t = typename ParticleBinning::AdaptBinsBase< ParticleContainer_t >
 
using binIndex_t = typename ParticleContainer_t::bin_index_type
 
using BCHandler_t = BCHandler< Dim >
 

Public Member Functions

 PartBunch (std::vector< double > qi, std::vector< double > mi, const std::vector< Beam * > &beams, std::vector< size_t > totalParticlesPerBeam, double lbt, std::string integration_method, FieldSolverCmd *OPALFieldSolver, DataSink *dataSink)
 Construct a multi-beam bunch: mesh, solver, containers, and capacity.
 
void bunchUpdate ()
 Refresh mesh from particle extents, update layouts, and recompute moments.
 
void computeBoundsForFieldSolve (Vector_t< double, Dim > &lower, Vector_t< double, Dim > &upper)
 Computes the spatial bounds for the field solver based on the current particle distribution.
 
void applyGridUpdate (const Vector_t< double, Dim > &lower, const Vector_t< double, Dim > &upper)
 Updates the mesh/grid and internal data structures to match the given spatial bounds.
 
void reinitializeGridZ (int nrZ)
 Reinitialize the z dimension of the field grid to nrZ cells.
 
void setImageChargeConfiguration (bool enabled, double zPlane)
 Set the image-charge configuration for the field solver.
 
void setShiftedGreensConfiguration (bool enabled, double zPlane)
 Set the shifted Green's function Dirichlet-correction configuration.
 
void setZeroFacePlaneDumpFrequency (int frequency)
 Configure diagnostic dump frequency for the ZEROFACE plane potential.
 
void setZerofaceMaxSteps (int maxSteps)
 Set the maximum number of timesteps for which image charges are active (0 = unlimited).
 
size_t getTotalNumAllContainers () const
 Sum of getTotalNum() over all particle containers.
 
void setSolver ()
 Build field solver and load balancer from OPALFieldSolver_m.
 
void setBins ()
 Create adaptive bins from the binning command (VELOCITYZ / GAMMAZ).
 
void pre_run () override
 Warm-up: zero rho and run the field solver once (skip full dumps).
 
void performBunchSanityChecks () const
 Validate BC handler, solver wiring, field pointers, and layout extents.
 
void resetPcActive ()
 At segment start: active if container is non-empty; inactive if empty.
 
bool isPcActive (size_t i) const
 
void setPcActive (size_t i)
 Force container i active (e.g. for containers with pending emission).
 
bool pcAtZStop (size_t i) const
 
void setPcAtZStop (size_t i)
 Deactivate container i until the next step-size segment (z-stop reached).
 
void refreshPcActiveAfterEmit ()
 After emission: reactivate non-empty containers not marked at z-stop.
 
bool anyPcActive () const
 
void advance () override
 PicManager hook; throws (tracking does not use this path).
 
void par2grid () override
 PicManager hook; throws (scatter handled elsewhere).
 
void grid2par () override
 PicManager hook; throws (gather handled elsewhere).
 
std::shared_ptr< VField_t< T, Dim > > getTempEField ()
 Scratch E field used by the binned solver path.
 
void setTempEField (std::shared_ptr< VField_t< T, Dim > > Etmp)
 
std::shared_ptr< VField_t< T, Dim > > getTempBField ()
 Scratch B field used by the binned solver path.
 
void setTempBField (std::shared_ptr< VField_t< T, Dim > > Btmp)
 
std::shared_ptr< AdaptBins_tgetBins ()
 Non-const access to adaptive binning state.
 
std::shared_ptr< AdaptBins_tgetBins () const
 Const access to adaptive binning state.
 
void setBins (std::shared_ptr< AdaptBins_t > bins)
 
void setBCHandler (std::shared_ptr< BCHandler_t > bcHandler)
 
std::shared_ptr< BCHandler_tgetBCHandler () const
 Current boundary-condition handler.
 
DataSinkgetDataSink () const
 
std::shared_ptr< BunchStateHandlergetBunchStateHandler ()
 
std::shared_ptr< const BunchStateHandlergetBunchStateHandler () const
 
void updateMoments ()
 
void calcBeamParameters ()
 Update moments and set rmin_m / rmax_m from the primary (first) container.
 
void setCharge ()
 Set the per-particle charge for each particle container.
 
void setMass ()
 Set the per-particle mass for each particle container.
 
double getCharge (size_t containerIndex=0) const
 Get the total charge for a given particle container.
 
double getChargePerParticle (size_t containerIndex=0) const
 Get the charge per particle for a given particle container.
 
double getMassPerParticle (size_t containerIndex=0) const
 Get the mass per particle for a given particle container.
 
double getQ (size_t containerIndex=0) const
 Alias for getCharge(containerIndex).
 
double getM (size_t containerIndex=0) const
 Get the total mass for a given particle container.
 
double getTotalCharge () const
 Get the total charge across all particle containers.
 
double getTotalMass () const
 Get the total mass across all particle containers.
 
double getdE ()
 
const PartDatagetReference () const
 
void setReference (const PartData *ref)
 Set inside TrackRun::execute.
 
void gatherLoadBalanceStatistics ()
 
size_t getLoadBalance (int p)
 
size_t calcNumPartsOutside (Vector_t< double, Dim >)
 Stub; logs and returns 0.
 
void calcLineDensity (unsigned int, std::vector< double > &, std::pair< double, double > &)
 Stub; logs only.
 
Vector_t< double, DimgetEExtrema ()
 Stub; logs and returns zero vector.
 
void computeSelfFields ()
 Compute the bunch self-fields (binned when available).
 
void dumpBinConfig (bool preMerge)
 Write bin edges/counts to the data sink when configured.
 
Inform & print (Inform &os)
 Human-readable dump of each container to os.
 
bool hasFieldSolver () const
 
BinnedFieldSolver_tgetFieldSolver ()
 Non-const pointer to the concrete BinnedFieldSolver.
 
const BinnedFieldSolver_tgetFieldSolver () const
 Const overload of getFieldSolver().
 
std::string getFieldSolverType ()
 Backend type string (e.g. FFT, OPEN, CG, NONE).
 
bool hasBinning () const
 
int getCurrentNBins () const
 Effective bin count for diagnostics (1 if binning inactive or still at max bins).
 
double calcMeanPhi ()
 Compatibility stub; logs and returns 0.
 
std::string getParticleName (size_t i) const
 Particle species name for container i (from BEAM PARTICLE input).
 
Vector_t< double, DimR (size_t)
 Do not use; throws (access positions via ParticleContainer::R).
 
Vector_t< double, DimP (size_t)
 Do not use; throws (access momenta via ParticleContainer::P).
 
void get_bounds (Vector_t< double, Dim > &rmin, Vector_t< double, Dim > &rmax)
 Copy cached bunch extent (rmin_m, rmax_m) from calcBeamParameters.
 
void setdT (double dt)
 Set the global time step.
 
double getdT () const
 Get the global time step.
 
void setT (double t)
 Set the current simulation time.
 
void incrementT ()
 Advance time by one global time step.
 
double getT () const
 Get the current simulation time.
 
Vector_t< double, Dimget_origin () const
 Cached minimum extent (rmin_m); prefer per-container min/max for multi-beam detail.
 
Vector_t< double, Dimget_maxExtent () const
 Cached maximum extent (rmax_m).
 
Vector_t< double, Dimget_halo () const
 Stub; logs and returns zero vector.
 
Vector_t< double, Dimget_hr () const
 Get mesh spacing.
 
void setGlobalTrackStep (long long n)
 
long long getGlobalTrackStep () const
 Current global tracking step.
 
void incTrackSteps ()
 Increment globalTrackStep_m by one.
 
void do_binaryRepart ()
 ORB/binary repartition when the load balancer requests it (primary container).
 
double get_rmsDensity () const
 Legacy RMS density field (may be unused).
 

Public Attributes

double dt_m
 Global time step \(\Delta t\) (s).
 
int it_m
 Iteration counter (legacy / diagnostics).
 
std::string integration_method_m
 Integrator name (e.g. leapfrog).
 
std::string solver_m
 Field solver type string from input.
 
Vector_t< int, Dimnr_m
 Mesh cell count per dimension.
 
int nrZBase_m = 0
 Base z grid count before any image-charge doubling; used to reset nr_m.
 
Vector_t< double, Dimorigin_m
 Mesh origin (lab coordinates).
 
Vector_t< double, Dimrmin_m
 
Vector_t< double, Dimrmax_m
 Current bunch spatial maximum (from primary container stats).
 
Vector_t< double, Dimhr_m
 Mesh spacing (m).
 
double lbt_m
 Load-balancer timescale parameter.
 
bool isFirstRepartition_m
 True until the first ORB-style repartition completes.
 
ippl::NDIndex< Dimdomain_m
 Global mesh index extent per dimension.
 
std::array< bool, Dimdecomp_m
 Domain decomposition flags (per axis).
 

Private Attributes

std::vector< bool > pcActive_m
 Per-container: participate in this track segment.
 
std::vector< bool > pcAtZStop_m
 Per-container: frozen at current z-stop until next segment.
 
std::vector< std::string > particleNames_m
 Per-container beam particle names.
 
std::vector< double > qi_m
 Charge per macroparticle [C], one entry per container.
 
std::vector< double > mi_m
 Mass per macroparticle [GeV], one entry per container.
 
const PartDatareference_m = nullptr
 Reference particle data (set by TrackRun::execute).
 
std::shared_ptr< BunchStateHandlerbunchState_m
 Bunch state: unitless flag, repartition flag, etc.
 
std::shared_ptr< BCHandler_tbcHandler_m
 Field boundary conditions.
 
std::shared_ptr< AdaptBins_tbins_m
 Adaptive velocity/gamma binning (optional).
 
FieldSolverCmdOPALFieldSolver_m
 Borrowed parsed FIELD_SOLVER command.
 
DataSinkdataSink_m
 Borrowed diagnostics and dump output sink.
 
double t_m
 Current simulation time (s).
 
std::shared_ptr< VField_t< T, Dim > > Etmp_m
 
std::shared_ptr< VField_t< T, Dim > > Btmp_m
 
long long globalTrackStep_m
 Global integration step counter.
 
std::unique_ptr< size_t[]> globalPartPerNode_m
 Per-rank particle counts for load-balance stats.
 
double rmsDensity_m
 Legacy RMS density placeholder (may still appear in stats).
 

Detailed Description

template<typename T, unsigned Dim>
class PartBunch< T, Dim >

Definition at line 52 of file PartBunch.h.

Member Typedef Documentation

◆ AdaptBins_t

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::AdaptBins_t = typename ParticleBinning::AdaptBinsBase<ParticleContainer_t>

Definition at line 65 of file PartBunch.h.

◆ Base

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::Base = ippl::ParticleBase< ippl::ParticleSpatialLayout<T, Dim>, Kokkos::DefaultExecutionSpace::memory_space>

Definition at line 60 of file PartBunch.h.

◆ BCHandler_t

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::BCHandler_t = BCHandler<Dim>

Definition at line 68 of file PartBunch.h.

◆ binIndex_t

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::binIndex_t = typename ParticleContainer_t::bin_index_type

Definition at line 66 of file PartBunch.h.

◆ BinnedFieldSolver_t

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::BinnedFieldSolver_t = BinnedFieldSolver<T, Dim>

Definition at line 58 of file PartBunch.h.

◆ CoordinateSelector_t

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::CoordinateSelector_t = typename ParticleBinning::CoordinateSelector<ParticleContainer_t>

Definition at line 63 of file PartBunch.h.

◆ FieldContainer_t

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::FieldContainer_t = FieldContainer<T, Dim>

Definition at line 57 of file PartBunch.h.

◆ GammaSelector_t

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::GammaSelector_t = typename ParticleBinning::GammaSelector<ParticleContainer_t>

Definition at line 64 of file PartBunch.h.

◆ LoadBalancer_t

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::LoadBalancer_t = LoadBalancer<T, Dim>

Definition at line 59 of file PartBunch.h.

◆ ParticleContainer_t

template<typename T , unsigned Dim>
using PartBunch< T, Dim >::ParticleContainer_t = ParticleContainer<T, Dim>

Definition at line 56 of file PartBunch.h.

Constructor & Destructor Documentation

◆ PartBunch()

template<typename T , unsigned Dim>
PartBunch< T, Dim >::PartBunch ( std::vector< double >  qi,
std::vector< double >  mi,
const std::vector< Beam * > &  beams,
std::vector< size_t >  totalParticlesPerBeam,
double  lbt,
std::string  integration_method,
FieldSolverCmd OPALFieldSolver,
DataSink dataSink 
)

Construct a multi-beam bunch: mesh, solver, containers, and capacity.

Construct a multi-beam bunch: mesh, solver, containers, and capacity.

Parameters
qiMacrocharge per container (C).
miMacromass per container (GeV/c²).
beamsOne Beam per container (reference particle, species).
totalParticlesPerBeamTarget macroparticle count per beam (for local allocation).
lbtLoad-balancer timescale.
integration_methodIntegrator label (e.g. leapfrog).
OPALFieldSolverBorrowed field solver command (mesh, BCs, optional binning).
dataSinkBorrowed non-null diagnostics output sink.
Todo:
if we want, we could also have a separate BunchStateHandler for each container later? But I think it could also make sense to only have one global handler.

Definition at line 22 of file PartBunch.cpp.

References PartBunch< T, Dim >::bunchState_m, FieldSolverCmd::constructBCHandler(), PartBunch< T, Dim >::dataSink_m, PartBunch< T, Dim >::decomp_m, Dim, PartBunch< T, Dim >::domain_m, PartBunch< T, Dim >::dt_m, PartBunch< T, Dim >::getBCHandler(), FieldSolverCmd::getDomDec(), FieldSolverCmd::getNX(), FieldSolverCmd::getNY(), FieldSolverCmd::getNZ(), PartBunch< T, Dim >::getParticleName(), ParticleProperties::getParticleType(), PartBunch< T, Dim >::getReference(), PartBunch< T, Dim >::getTempBField(), PartBunch< T, Dim >::getTempEField(), PartBunch< T, Dim >::globalPartPerNode_m, gmsg, PartBunch< T, Dim >::hr_m, PartBunch< T, Dim >::mi_m, PartBunch< T, Dim >::nr_m, PartBunch< T, Dim >::nrZBase_m, PartBunch< T, Dim >::OPALFieldSolver_m, PartBunch< T, Dim >::origin_m, PartBunch< T, Dim >::particleNames_m, BCHandler< Dim >::PERIODIC, PartBunch< T, Dim >::pre_run(), PartBunch< T, Dim >::qi_m, PartBunch< T, Dim >::resetPcActive(), PartBunch< T, Dim >::rmax_m, PartBunch< T, Dim >::rmin_m, PartBunch< T, Dim >::setBCHandler(), PartBunch< T, Dim >::setSolver(), PartBunch< T, Dim >::setT(), PartBunch< T, Dim >::setTempBField(), and PartBunch< T, Dim >::setTempEField().

Here is the call graph for this function:

Member Function Documentation

◆ advance()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::advance ( )
inlineoverride

PicManager hook; throws (tracking does not use this path).

Definition at line 286 of file PartBunch.h.

◆ anyPcActive()

template<typename T , unsigned Dim>
bool PartBunch< T, Dim >::anyPcActive ( ) const
inline
Returns
True if any container is active.

Definition at line 276 of file PartBunch.h.

References PartBunch< T, Dim >::pcActive_m.

Referenced by ParallelTracker::execute().

◆ applyGridUpdate()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::applyGridUpdate ( const Vector_t< double, Dim > &  lower,
const Vector_t< double, Dim > &  upper 
)

Updates the mesh/grid and internal data structures to match the given spatial bounds.

Sets the mesh spacing and origin for the field container based on the difference between lower and upper, updates references to domain boundaries, and applies these updates to the underlying mesh and field layout. Triggers a reevaluation of particle container layouts to ensure the grid matches the computed domain.

Parameters
[in]lowerThe minimum coordinates (origin) for the domain in all dimensions.
[in]upperThe maximum coordinates for the domain in all dimensions.
Todo:
there might be a case where we can keep the moments clean if we know more about what exactly was changed due to update().

Definition at line 658 of file PartBunch.cpp.

◆ bunchUpdate()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::bunchUpdate ( )

Refresh mesh from particle extents, update layouts, and recompute moments.

Typical call sites

Definition at line 560 of file PartBunch.cpp.

References BinnedFieldSolver< T, Dim >::isImageChargeActiveForStep().

Referenced by ParallelTracker::computeSpaceChargeFields(), and ParallelTracker::execute().

Here is the call graph for this function:

◆ calcBeamParameters()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::calcBeamParameters ( )

Update moments and set rmin_m / rmax_m from the primary (first) container.

Update moments and set rmin_m / rmax_m from the primary (first) container.

Note
Space-charge and mesh updates currently use container 0 only.

Definition at line 338 of file PartBunch.cpp.

References Dim.

Referenced by ParallelTracker::computeSpaceChargeFields(), and DataSink::dumpSDDS().

◆ calcLineDensity()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::calcLineDensity ( unsigned int  ,
std::vector< double > &  ,
std::pair< double, double > &   
)
inline

Stub; logs only.

Definition at line 519 of file PartBunch.h.

References gmsg.

◆ calcMeanPhi()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::calcMeanPhi ( )
inline

Compatibility stub; logs and returns 0.

Definition at line 596 of file PartBunch.h.

References gmsg.

◆ calcNumPartsOutside()

template<typename T , unsigned Dim>
size_t PartBunch< T, Dim >::calcNumPartsOutside ( Vector_t< double, Dim )
inline

Stub; logs and returns 0.

Definition at line 512 of file PartBunch.h.

References gmsg.

Referenced by DataSink::dumpSDDS().

◆ computeBoundsForFieldSolve()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::computeBoundsForFieldSolve ( Vector_t< double, Dim > &  lower,
Vector_t< double, Dim > &  upper 
)

Computes the spatial bounds for the field solver based on the current particle distribution.

Determines the minimum and maximum coordinates (lower, upper) in each dimension that encompass all particles in the current container. Adjusts these bounds if image-charge boundary conditions are enabled to ensure the domain includes both the real and mirrored charge distributions. Guarantees a minimal span (e.g., 1e-6) in each dimension for validity and applies an additional extension based on the field solver's box increment percentage.

Parameters
[out]lowerThe lowest coordinate per dimension after considering all particles and any boundary extensions.
[out]upperThe highest coordinate per dimension after considering all particles and any boundary extensions.

Definition at line 593 of file PartBunch.cpp.

References Dim, BinnedFieldSolver< T, Dim >::getImageChargePlaneZ(), and BinnedFieldSolver< T, Dim >::isImageChargeActiveForStep().

Here is the call graph for this function:

◆ computeSelfFields()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::computeSelfFields ( )

Compute the bunch self-fields (binned when available).

Compute the bunch self-fields (binned when available).

The actual implementation lives in the solver object (see BinnedFieldSolver). ParallelTracker only orchestrates reference/beam-frame transforms and calls this delegator once per step.

Definition at line 719 of file PartBunch.cpp.

References BinnedFieldSolver< T, Dim >::computeSelfFields().

Referenced by ParallelTracker::computeSpaceChargeFields().

Here is the call graph for this function:

◆ do_binaryRepart()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::do_binaryRepart ( )

ORB/binary repartition when the load balancer requests it (primary container).

ORB/binary repartition when the load balancer requests it (primary container).

Definition at line 219 of file PartBunch.cpp.

◆ dumpBinConfig()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::dumpBinConfig ( bool  preMerge)

Write bin edges/counts to the data sink when configured.

Write bin edges/counts to the data sink when configured.

Parameters
preMergeTrue if called before a bin-merge step.

Definition at line 729 of file PartBunch.cpp.

References BinningCmd::dumpBinsToFile(), BinningCmd::getDumpBinsFileName(), and BinningCmd::getDumpBinsFrequency().

Here is the call graph for this function:

◆ gatherLoadBalanceStatistics()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::gatherLoadBalanceStatistics ( )

Definition at line 231 of file PartBunch.cpp.

Referenced by DataSink::dumpSDDS().

◆ get_bounds()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::get_bounds ( Vector_t< double, Dim > &  rmin,
Vector_t< double, Dim > &  rmax 
)
inline

Copy cached bunch extent (rmin_m, rmax_m) from calcBeamParameters.

Parameters
[out]rminLower corner.
[out]rmaxUpper corner.

Definition at line 633 of file PartBunch.h.

References PartBunch< T, Dim >::rmax_m, and PartBunch< T, Dim >::rmin_m.

Referenced by Probe::doPreCheck(), and ParallelTracker::writePhaseSpace().

◆ get_halo()

template<typename T , unsigned Dim>
Vector_t< double, Dim > PartBunch< T, Dim >::get_halo ( ) const
inline

Stub; logs and returns zero vector.

Definition at line 660 of file PartBunch.h.

References gmsg.

Referenced by StatWriter::write().

◆ get_hr()

template<typename T , unsigned Dim>
Vector_t< double, Dim > PartBunch< T, Dim >::get_hr ( ) const
inline

Get mesh spacing.

Definition at line 667 of file PartBunch.h.

References PartBunch< T, Dim >::hr_m.

◆ get_maxExtent()

template<typename T , unsigned Dim>
Vector_t< double, Dim > PartBunch< T, Dim >::get_maxExtent ( ) const
inline

Cached maximum extent (rmax_m).

Definition at line 657 of file PartBunch.h.

References PartBunch< T, Dim >::rmax_m.

Referenced by H5PartWrapperForPT::writeStepHeader().

◆ get_origin()

template<typename T , unsigned Dim>
Vector_t< double, Dim > PartBunch< T, Dim >::get_origin ( ) const
inline

Cached minimum extent (rmin_m); prefer per-container min/max for multi-beam detail.

Definition at line 655 of file PartBunch.h.

References PartBunch< T, Dim >::rmin_m.

Referenced by H5PartWrapperForPT::writeStepHeader().

◆ get_rmsDensity()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::get_rmsDensity ( ) const
inline

Legacy RMS density field (may be unused).

Definition at line 682 of file PartBunch.h.

References PartBunch< T, Dim >::rmsDensity_m.

Referenced by StatWriter::write().

◆ getBCHandler()

template<typename T , unsigned Dim>
std::shared_ptr< BCHandler_t > PartBunch< T, Dim >::getBCHandler ( ) const
inline

Current boundary-condition handler.

Definition at line 331 of file PartBunch.h.

References PartBunch< T, Dim >::bcHandler_m.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ getBins() [1/2]

template<typename T , unsigned Dim>
std::shared_ptr< AdaptBins_t > PartBunch< T, Dim >::getBins ( )
inline

Non-const access to adaptive binning state.

Definition at line 319 of file PartBunch.h.

References PartBunch< T, Dim >::bins_m.

Referenced by PartBunch< T, Dim >::getCurrentNBins().

◆ getBins() [2/2]

template<typename T , unsigned Dim>
std::shared_ptr< AdaptBins_t > PartBunch< T, Dim >::getBins ( ) const
inline

Const access to adaptive binning state.

Definition at line 322 of file PartBunch.h.

References PartBunch< T, Dim >::bins_m.

◆ getBunchStateHandler() [1/2]

template<typename T , unsigned Dim>
std::shared_ptr< BunchStateHandler > PartBunch< T, Dim >::getBunchStateHandler ( )
inline

Definition at line 335 of file PartBunch.h.

References PartBunch< T, Dim >::bunchState_m.

◆ getBunchStateHandler() [2/2]

template<typename T , unsigned Dim>
std::shared_ptr< const BunchStateHandler > PartBunch< T, Dim >::getBunchStateHandler ( ) const
inline

Definition at line 336 of file PartBunch.h.

References PartBunch< T, Dim >::bunchState_m.

◆ getCharge()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::getCharge ( size_t  containerIndex = 0) const
inline

Get the total charge for a given particle container.

Parameters
containerIndexIndex of the particle container.
Returns
qi_m[containerIndex] * getParticleContainers()[containerIndex]->getTotalNum().
Note
Throws if the number of particle containers and qi_m entries do not match, or if containerIndex is out of range.

Definition at line 387 of file PartBunch.h.

References PartBunch< T, Dim >::qi_m.

Referenced by PartBunch< T, Dim >::getQ().

◆ getChargePerParticle()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::getChargePerParticle ( size_t  containerIndex = 0) const
inline

Get the charge per particle for a given particle container.

Parameters
containerIndexIndex of the particle container.
Returns
qi_m[containerIndex].
Note
Throws if containerIndex is out of range.

Definition at line 406 of file PartBunch.h.

References PartBunch< T, Dim >::qi_m.

Referenced by Multipole::isFocusing().

◆ getCurrentNBins()

template<typename T , unsigned Dim>
int PartBunch< T, Dim >::getCurrentNBins ( ) const
inline

Effective bin count for diagnostics (1 if binning inactive or still at max bins).

Definition at line 574 of file PartBunch.h.

References PartBunch< T, Dim >::bins_m, PartBunch< T, Dim >::getBins(), and PartBunch< T, Dim >::hasBinning().

Referenced by StatWriter::write().

Here is the call graph for this function:

◆ getDataSink()

template<typename T , unsigned Dim>
DataSink * PartBunch< T, Dim >::getDataSink ( ) const
inline

Definition at line 333 of file PartBunch.h.

References PartBunch< T, Dim >::dataSink_m.

◆ getdE()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::getdE ( )
inline

Definition at line 490 of file PartBunch.h.

◆ getdT()

◆ getEExtrema()

template<typename T , unsigned Dim>
Vector_t< double, Dim > PartBunch< T, Dim >::getEExtrema ( )
inline

Stub; logs and returns zero vector.

Definition at line 527 of file PartBunch.h.

References gmsg.

◆ getFieldSolver() [1/2]

template<typename T , unsigned Dim>
PartBunch< T, Dim >::BinnedFieldSolver_t * PartBunch< T, Dim >::getFieldSolver ( )

Non-const pointer to the concrete BinnedFieldSolver.

Create adaptive bins from the binning command (VELOCITYZ / GAMMAZ).

Note
Definition in PartBunch.cpp; requires complete BinnedFieldSolver type.

Definition at line 277 of file PartBunch.cpp.

Referenced by ParallelTracker::execute(), and ParallelTracker::markBackwardParticlesAtSourcePlane().

◆ getFieldSolver() [2/2]

template<typename T , unsigned Dim>
const PartBunch< T, Dim >::BinnedFieldSolver_t * PartBunch< T, Dim >::getFieldSolver ( ) const

Const overload of getFieldSolver().

Definition at line 282 of file PartBunch.cpp.

◆ getFieldSolverType()

template<typename T , unsigned Dim>
std::string PartBunch< T, Dim >::getFieldSolverType ( )

Backend type string (e.g. FFT, OPEN, CG, NONE).

Definition at line 287 of file PartBunch.cpp.

◆ getGlobalTrackStep()

template<typename T , unsigned Dim>
long long PartBunch< T, Dim >::getGlobalTrackStep ( ) const
inline

◆ getLoadBalance()

template<typename T , unsigned Dim>
size_t PartBunch< T, Dim >::getLoadBalance ( int  p)
inline

Definition at line 509 of file PartBunch.h.

References PartBunch< T, Dim >::globalPartPerNode_m.

◆ getM()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::getM ( size_t  containerIndex = 0) const
inline

Get the total mass for a given particle container.

Parameters
containerIndexIndex of the particle container.
Returns
mi_m[containerIndex] * getParticleContainers()[containerIndex]->getTotalNum().
Note
Throws if the number of particle containers and mi_m entries do not match, or if containerIndex is out of range.

Definition at line 440 of file PartBunch.h.

References PartBunch< T, Dim >::mi_m.

◆ getMassPerParticle()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::getMassPerParticle ( size_t  containerIndex = 0) const
inline

Get the mass per particle for a given particle container.

Parameters
containerIndexIndex of the particle container.
Returns
mi_m[containerIndex].
Note
Throws if containerIndex is out of range.

Definition at line 419 of file PartBunch.h.

References PartBunch< T, Dim >::mi_m.

◆ getParticleName()

template<typename T , unsigned Dim>
std::string PartBunch< T, Dim >::getParticleName ( size_t  i) const
inline

Particle species name for container i (from BEAM PARTICLE input).

Definition at line 603 of file PartBunch.h.

References PartBunch< T, Dim >::particleNames_m.

Referenced by PartBunch< T, Dim >::PartBunch(), and StatWriter::write().

◆ getQ()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::getQ ( size_t  containerIndex = 0) const
inline

Alias for getCharge(containerIndex).

Parameters
containerIndexIndex of the particle container.
Returns
Equivalent to getCharge(containerIndex).

Definition at line 431 of file PartBunch.h.

References PartBunch< T, Dim >::getCharge().

Here is the call graph for this function:

◆ getReference()

◆ getT()

◆ getTempBField()

template<typename T , unsigned Dim>
std::shared_ptr< VField_t< T, Dim > > PartBunch< T, Dim >::getTempBField ( )
inline

Scratch B field used by the binned solver path.

Definition at line 313 of file PartBunch.h.

References PartBunch< T, Dim >::Btmp_m.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ getTempEField()

template<typename T , unsigned Dim>
std::shared_ptr< VField_t< T, Dim > > PartBunch< T, Dim >::getTempEField ( )
inline

Scratch E field used by the binned solver path.

Definition at line 307 of file PartBunch.h.

References PartBunch< T, Dim >::Etmp_m.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ getTotalCharge()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::getTotalCharge ( ) const
inline

Get the total charge across all particle containers.

Returns
sum_i(qi_m[i] * containers[i]->getTotalNum()).
Note
Throws if the number of particle containers and qi_m entries do not match.

Definition at line 457 of file PartBunch.h.

References PartBunch< T, Dim >::qi_m.

Referenced by RFCavity::initialise(), and DataSink::writeImpactStatistics().

◆ getTotalMass()

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::getTotalMass ( ) const
inline

Get the total mass across all particle containers.

Returns
sum_i(mi_m[i] * containers[i]->getTotalNum()).
Note
Throws if the number of particle containers and mi_m entries do not match.

Definition at line 476 of file PartBunch.h.

References PartBunch< T, Dim >::mi_m.

◆ getTotalNumAllContainers()

template<typename T , unsigned Dim>
size_t PartBunch< T, Dim >::getTotalNumAllContainers ( ) const
inline

Sum of getTotalNum() over all particle containers.

Definition at line 226 of file PartBunch.h.

Referenced by ParallelTracker::dumpStats(), ParallelTracker::execute(), ParallelTracker::printInitialContainerRefs(), and ParallelTracker::writePhaseSpace().

◆ grid2par()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::grid2par ( )
inlineoverride

PicManager hook; throws (gather handled elsewhere).

Definition at line 300 of file PartBunch.h.

◆ hasBinning()

template<typename T , unsigned Dim>
bool PartBunch< T, Dim >::hasBinning ( ) const
inline
Returns
True if adaptive binning is configured.

Definition at line 569 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getCurrentNBins().

◆ hasFieldSolver()

template<typename T , unsigned Dim>
bool PartBunch< T, Dim >::hasFieldSolver ( ) const
inline
Returns
True if a field solver instance is installed.

Definition at line 554 of file PartBunch.h.

Referenced by ParallelTracker::computeSpaceChargeFields(), and ParallelTracker::execute().

◆ incrementT()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::incrementT ( )
inline

Advance time by one global time step.

Definition at line 648 of file PartBunch.h.

References PartBunch< T, Dim >::dt_m, and PartBunch< T, Dim >::t_m.

Referenced by ParallelTracker::execute().

◆ incTrackSteps()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::incTrackSteps ( )
inline

Increment globalTrackStep_m by one.

Definition at line 676 of file PartBunch.h.

References PartBunch< T, Dim >::globalTrackStep_m.

Referenced by ParallelTracker::execute().

◆ isPcActive()

◆ P()

template<typename T , unsigned Dim>
Vector_t< double, Dim > PartBunch< T, Dim >::P ( size_t  )
inline

Do not use; throws (access momenta via ParticleContainer::P).

Definition at line 620 of file PartBunch.h.

Referenced by Corrector::apply(), PluginElement::changeWidth(), LF2< FieldFunction, Arguments >::doAdvance_m(), and Probe::doCheck().

◆ par2grid()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::par2grid ( )
inlineoverride

PicManager hook; throws (scatter handled elsewhere).

Definition at line 293 of file PartBunch.h.

◆ pcAtZStop()

template<typename T , unsigned Dim>
bool PartBunch< T, Dim >::pcAtZStop ( size_t  i) const
inline
Parameters
iContainer index.
Returns
Whether container i is frozen at the current z-stop.

Definition at line 267 of file PartBunch.h.

References PartBunch< T, Dim >::pcAtZStop_m.

Referenced by ParallelTracker::emitFromEmissionSources().

◆ performBunchSanityChecks()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::performBunchSanityChecks ( ) const

Validate BC handler, solver wiring, field pointers, and layout extents.

Validate BC handler, solver wiring, field pointers, and layout extents.

Exceptions
OpalExceptionif initialization is inconsistent.

Definition at line 780 of file PartBunch.cpp.

Referenced by ParallelTracker::execute().

◆ pre_run()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::pre_run ( )
override

Warm-up: zero rho and run the field solver once (skip full dumps).

Warm-up: zero rho and run the field solver once (skip full dumps).

Definition at line 439 of file PartBunch.cpp.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ print()

template<typename T , unsigned Dim>
Inform & PartBunch< T, Dim >::print ( Inform &  os)

Human-readable dump of each container to os.

Human-readable dump of each container to os.

Parameters
osOutput stream wrapper.
Returns
Reference to os.

Definition at line 460 of file PartBunch.cpp.

References ParticleContainer< T, Dim >::Attributes, Dim, Util::getEnergyString(), and Util::getLengthString().

Here is the call graph for this function:

◆ R()

◆ refreshPcActiveAfterEmit()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::refreshPcActiveAfterEmit ( )

After emission: reactivate non-empty containers not marked at z-stop.

After emission: reactivate non-empty containers not marked at z-stop.

Definition at line 198 of file PartBunch.cpp.

Referenced by ParallelTracker::emitFromEmissionSources().

◆ reinitializeGridZ()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::reinitializeGridZ ( int  nrZ)

Reinitialize the z dimension of the field grid to nrZ cells.

Refresh mesh from particle extents, update layouts, and recompute moments.

Rebuilds the FieldLayout, all field arrays, the accumulation buffers, and the IPPL Poisson solver to match the new z extent. A no-op if nrZ equals the current z cell count. Called from bunchUpdate to double the z resolution while image charges are active.

Parameters
nrZTarget number of z grid cells.

Definition at line 528 of file PartBunch.cpp.

References Dim.

◆ resetPcActive()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::resetPcActive ( )

At segment start: active if container is non-empty; inactive if empty.

At segment start: active if container is non-empty; inactive if empty.

Definition at line 166 of file PartBunch.cpp.

Referenced by ParallelTracker::execute(), and PartBunch< T, Dim >::PartBunch().

◆ setBCHandler()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setBCHandler ( std::shared_ptr< BCHandler_t bcHandler)
inline
Parameters
bcHandlerBoundary-condition handler for the mesh.

Definition at line 328 of file PartBunch.h.

References PartBunch< T, Dim >::bcHandler_m.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ setBins() [1/2]

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setBins ( )

Create adaptive bins from the binning command (VELOCITYZ / GAMMAZ).

Definition at line 292 of file PartBunch.cpp.

References GAMMAZ, BinningCmd::getBinningAlpha(), BinningCmd::getBinningBeta(), BinningCmd::getDesiredWidth(), BinningCmd::getMaxBins(), Object::getOpalName(), BinningCmd::getParameter(), BinningCmd::getParameterType(), and VELOCITYZ.

Here is the call graph for this function:

◆ setBins() [2/2]

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setBins ( std::shared_ptr< AdaptBins_t bins)
inline
Parameters
binsAdaptive binning object (or nullptr to clear).

Definition at line 325 of file PartBunch.h.

References PartBunch< T, Dim >::bins_m.

◆ setCharge()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setCharge ( )
inline

Set the per-particle charge for each particle container.

Note
Copies values from qi_m into each particle container via setQ.
Throws if the number of particle containers and qi_m entries do not match.

Definition at line 351 of file PartBunch.h.

References PartBunch< T, Dim >::qi_m.

◆ setdT()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setdT ( double  dt)
inline

Set the global time step.

Definition at line 639 of file PartBunch.h.

References PartBunch< T, Dim >::dt_m.

Referenced by ParallelTracker::execute(), and ParallelTracker::selectDT().

◆ setGlobalTrackStep()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setGlobalTrackStep ( long long  n)
inline
Parameters
nGlobal step counter to store.

Definition at line 670 of file PartBunch.h.

References PartBunch< T, Dim >::globalTrackStep_m.

Referenced by H5PartWrapperForPT::readStepHeader().

◆ setImageChargeConfiguration()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setImageChargeConfiguration ( bool  enabled,
double  zPlane 
)

Set the image-charge configuration for the field solver.

Parameters
enabledEnable image-charge scatter mirror when true.
zPlaneMirror plane position in z [m].

Definition at line 696 of file PartBunch.cpp.

◆ setMass()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setMass ( )
inline

Set the per-particle mass for each particle container.

Note
Copies values from mi_m into each particle container via setM.
Throws if the number of particle containers and mi_m entries do not match.

Definition at line 368 of file PartBunch.h.

References PartBunch< T, Dim >::mi_m.

◆ setPcActive()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setPcActive ( size_t  i)
inline

Force container i active (e.g. for containers with pending emission).

Definition at line 259 of file PartBunch.h.

References PartBunch< T, Dim >::pcActive_m.

Referenced by ParallelTracker::activateEmittingContainers().

◆ setPcAtZStop()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setPcAtZStop ( size_t  i)

Deactivate container i until the next step-size segment (z-stop reached).

Deactivate container i until the next step-size segment (z-stop reached).

Definition at line 186 of file PartBunch.cpp.

Referenced by ParallelTracker::execute().

◆ setReference()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setReference ( const PartData ref)
inline

Set inside TrackRun::execute.

Definition at line 497 of file PartBunch.h.

References Units::eV2GeV, PartData::getM(), and PartBunch< T, Dim >::reference_m.

Here is the call graph for this function:

◆ setShiftedGreensConfiguration()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setShiftedGreensConfiguration ( bool  enabled,
double  zPlane 
)

Set the shifted Green's function Dirichlet-correction configuration.

Alternative to setImageChargeConfiguration. Mutually exclusive with it. Requires the OPEN field solver (checked at runtime in the correction pass).

Parameters
enabledEnable the shifted-Green's-function correction when true.
zPlaneDirichlet plane position in z [m].

Definition at line 701 of file PartBunch.cpp.

◆ setSolver()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setSolver ( )

Build field solver and load balancer from OPALFieldSolver_m.

Build field solver and load balancer from OPALFieldSolver_m.

Definition at line 241 of file PartBunch.cpp.

References BinningCmd::getAdaptiveBinning(), and BinningCmd::getTablePrintFrequency().

Referenced by PartBunch< T, Dim >::PartBunch().

Here is the call graph for this function:

◆ setT()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setT ( double  t)
inline

◆ setTempBField()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setTempBField ( std::shared_ptr< VField_t< T, Dim > >  Btmp)
inline
Parameters
BtmpScratch B field matching the mesh layout.

Definition at line 316 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ setTempEField()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setTempEField ( std::shared_ptr< VField_t< T, Dim > >  Etmp)
inline
Parameters
EtmpScratch E field matching the mesh layout.

Definition at line 310 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ setZerofaceMaxSteps()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setZerofaceMaxSteps ( int  maxSteps)

Set the maximum number of timesteps for which image charges are active (0 = unlimited).

Definition at line 711 of file PartBunch.cpp.

◆ setZeroFacePlaneDumpFrequency()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::setZeroFacePlaneDumpFrequency ( int  frequency)

Configure diagnostic dump frequency for the ZEROFACE plane potential.

Parameters
frequencyDump every n-th global timestep. 0 disables dumping.

Definition at line 706 of file PartBunch.cpp.

◆ updateMoments()

template<typename T , unsigned Dim>
void PartBunch< T, Dim >::updateMoments ( )
inline

Definition at line 338 of file PartBunch.h.

Referenced by DataSink::dumpSDDS(), and ParallelTracker::dumpStats().

Member Data Documentation

◆ bcHandler_m

template<typename T , unsigned Dim>
std::shared_ptr<BCHandler_t> PartBunch< T, Dim >::bcHandler_m
private

Field boundary conditions.

Definition at line 104 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getBCHandler(), and PartBunch< T, Dim >::setBCHandler().

◆ bins_m

template<typename T , unsigned Dim>
std::shared_ptr<AdaptBins_t> PartBunch< T, Dim >::bins_m
private

Adaptive velocity/gamma binning (optional).

Definition at line 105 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getBins(), PartBunch< T, Dim >::getBins(), PartBunch< T, Dim >::getCurrentNBins(), and PartBunch< T, Dim >::setBins().

◆ Btmp_m

template<typename T , unsigned Dim>
std::shared_ptr<VField_t<T, Dim> > PartBunch< T, Dim >::Btmp_m
private

Scratch B field for binned accumulation (same layout as mesh B).

Definition at line 114 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getTempBField().

◆ bunchState_m

template<typename T , unsigned Dim>
std::shared_ptr<BunchStateHandler> PartBunch< T, Dim >::bunchState_m
private

Bunch state: unitless flag, repartition flag, etc.

Definition at line 102 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getBunchStateHandler(), PartBunch< T, Dim >::getBunchStateHandler(), and PartBunch< T, Dim >::PartBunch().

◆ dataSink_m

template<typename T , unsigned Dim>
DataSink* PartBunch< T, Dim >::dataSink_m
private

Borrowed diagnostics and dump output sink.

Definition at line 107 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getDataSink(), and PartBunch< T, Dim >::PartBunch().

◆ decomp_m

template<typename T , unsigned Dim>
std::array<bool, Dim> PartBunch< T, Dim >::decomp_m

Domain decomposition flags (per axis).

Definition at line 89 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ domain_m

template<typename T , unsigned Dim>
ippl::NDIndex<Dim> PartBunch< T, Dim >::domain_m

Global mesh index extent per dimension.

Definition at line 88 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ dt_m

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::dt_m

Global time step \(\Delta t\) (s).

Definition at line 73 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getdT(), PartBunch< T, Dim >::incrementT(), PartBunch< T, Dim >::PartBunch(), and PartBunch< T, Dim >::setdT().

◆ Etmp_m

template<typename T , unsigned Dim>
std::shared_ptr<VField_t<T, Dim> > PartBunch< T, Dim >::Etmp_m
private

Scratch E field for binned accumulation (same layout as mesh E).

Definition at line 112 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getTempEField().

◆ globalPartPerNode_m

template<typename T , unsigned Dim>
std::unique_ptr<size_t[]> PartBunch< T, Dim >::globalPartPerNode_m
private

Per-rank particle counts for load-balance stats.

Definition at line 119 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getLoadBalance(), and PartBunch< T, Dim >::PartBunch().

◆ globalTrackStep_m

template<typename T , unsigned Dim>
long long PartBunch< T, Dim >::globalTrackStep_m
private

Global integration step counter.

Definition at line 116 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getGlobalTrackStep(), PartBunch< T, Dim >::incTrackSteps(), and PartBunch< T, Dim >::setGlobalTrackStep().

◆ hr_m

template<typename T , unsigned Dim>
Vector_t<double, Dim> PartBunch< T, Dim >::hr_m

Mesh spacing (m).

Definition at line 84 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::get_hr(), and PartBunch< T, Dim >::PartBunch().

◆ integration_method_m

template<typename T , unsigned Dim>
std::string PartBunch< T, Dim >::integration_method_m

Integrator name (e.g. leapfrog).

Definition at line 75 of file PartBunch.h.

◆ isFirstRepartition_m

template<typename T , unsigned Dim>
bool PartBunch< T, Dim >::isFirstRepartition_m

True until the first ORB-style repartition completes.

Definition at line 87 of file PartBunch.h.

◆ it_m

template<typename T , unsigned Dim>
int PartBunch< T, Dim >::it_m

Iteration counter (legacy / diagnostics).

Definition at line 74 of file PartBunch.h.

◆ lbt_m

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::lbt_m

Load-balancer timescale parameter.

Definition at line 86 of file PartBunch.h.

◆ mi_m

template<typename T , unsigned Dim>
std::vector<double> PartBunch< T, Dim >::mi_m
private

◆ nr_m

template<typename T , unsigned Dim>
Vector_t<int, Dim> PartBunch< T, Dim >::nr_m

Mesh cell count per dimension.

Definition at line 77 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ nrZBase_m

template<typename T , unsigned Dim>
int PartBunch< T, Dim >::nrZBase_m = 0

Base z grid count before any image-charge doubling; used to reset nr_m.

Definition at line 78 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ OPALFieldSolver_m

template<typename T , unsigned Dim>
FieldSolverCmd* PartBunch< T, Dim >::OPALFieldSolver_m
private

Borrowed parsed FIELD_SOLVER command.

Definition at line 106 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ origin_m

template<typename T , unsigned Dim>
Vector_t<double, Dim> PartBunch< T, Dim >::origin_m

Mesh origin (lab coordinates).

Definition at line 79 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::PartBunch().

◆ particleNames_m

template<typename T , unsigned Dim>
std::vector<std::string> PartBunch< T, Dim >::particleNames_m
private

Per-container beam particle names.

Definition at line 94 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getParticleName(), and PartBunch< T, Dim >::PartBunch().

◆ pcActive_m

template<typename T , unsigned Dim>
std::vector<bool> PartBunch< T, Dim >::pcActive_m
private

Per-container: participate in this track segment.

Definition at line 92 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::anyPcActive(), PartBunch< T, Dim >::isPcActive(), and PartBunch< T, Dim >::setPcActive().

◆ pcAtZStop_m

template<typename T , unsigned Dim>
std::vector<bool> PartBunch< T, Dim >::pcAtZStop_m
private

Per-container: frozen at current z-stop until next segment.

Definition at line 93 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::pcAtZStop().

◆ qi_m

template<typename T , unsigned Dim>
std::vector<double> PartBunch< T, Dim >::qi_m
private

◆ reference_m

template<typename T , unsigned Dim>
const PartData* PartBunch< T, Dim >::reference_m = nullptr
private

Reference particle data (set by TrackRun::execute).

Definition at line 99 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getReference(), and PartBunch< T, Dim >::setReference().

◆ rmax_m

template<typename T , unsigned Dim>
Vector_t<double, Dim> PartBunch< T, Dim >::rmax_m

Current bunch spatial maximum (from primary container stats).

Definition at line 83 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::get_bounds(), PartBunch< T, Dim >::get_maxExtent(), and PartBunch< T, Dim >::PartBunch().

◆ rmin_m

template<typename T , unsigned Dim>
Vector_t<double, Dim> PartBunch< T, Dim >::rmin_m

Current bunch spatial minimum (from primary container stats; see calcBeamParameters).

Definition at line 80 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::get_bounds(), PartBunch< T, Dim >::get_origin(), and PartBunch< T, Dim >::PartBunch().

◆ rmsDensity_m

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::rmsDensity_m
private

Legacy RMS density placeholder (may still appear in stats).

Definition at line 121 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::get_rmsDensity().

◆ solver_m

template<typename T , unsigned Dim>
std::string PartBunch< T, Dim >::solver_m

Field solver type string from input.

Definition at line 76 of file PartBunch.h.

◆ t_m

template<typename T , unsigned Dim>
double PartBunch< T, Dim >::t_m
private

Current simulation time (s).

Definition at line 109 of file PartBunch.h.

Referenced by PartBunch< T, Dim >::getT(), PartBunch< T, Dim >::incrementT(), and PartBunch< T, Dim >::setT().


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