|
OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
|
Container for all per-particle (and per-simulation) fields tracked during OPALX tracking. More...
#include <ParticleContainer.hpp>
Inherits ippl::ParticleBase< ippl::ParticleSpatialLayout< T, 3 >, Kokkos::DefaultExecutionSpace::memory_space >.

Public Types | |
| enum class | QMStorageMode { SingleValue , Attributes } |
| using | bin_index_type = short int |
| Defines which type to use as a particle bin. | |
| using | qm_view_type = typename ippl::ParticleAttrib< double >::view_type |
| View types of Q and M values. | |
| using | spin_vector_type = ippl::Vector< float, 3 > |
Public Member Functions | |
| qm_view_type | getQView () const |
| qm_view_type | getMView () const |
| bool | hasSpin () const |
| ParticleContainer (Mesh_t< Dim > &mesh, FieldLayout_t< Dim > &FL, bool spinEnabled=false) | |
| ~ParticleContainer () | |
| void | registerAttributes () |
| void | setupBCs () |
| void | transformBunch (const CoordinateSystemTrafo &trafo) |
| Apply coordinate transform to local particles: translate R, rotate P, E, B. | |
| PLayout_t< T, Dim > & | getPL () |
| void | setBunchStateHandler (std::shared_ptr< BunchStateHandler > handler) |
| bool | isUnitlessPositions () const |
| bool | isMomentsDirty () const |
| void | markMomentsDirty () |
| void | markMomentsClean () |
| void | updateMoments () |
| void | setEnergyReferenceMass (double referenceMassGeV, bool rescaleToReference=true) |
| Vector_t< double, 3 > | getMeanP () const |
| Vector_t< double, 3 > | getRmsP () const |
| Vector_t< double, 3 > | getMeanR () const |
| Vector_t< double, 3 > | getRmsR () const |
| Vector_t< double, 3 > | getRmsRP () const |
| void | computeMinMaxR () |
| Vector_t< double, 3 > | getMinR () const |
| Vector_t< double, 3 > | getMaxR () const |
| matrix6x6_t | getCovMatrix () const |
| double | getMeanKineticEnergy () const |
| double | getStdKineticEnergy () const |
| Vector_t< double, 6 > | getMeans () const |
| Vector_t< double, 6 > | getCentroid () const |
| Vector_t< double, 3 > | getNormEmit () const |
| Vector_t< double, 3 > | getGeometricEmit () const |
| double | getDx () const |
| double | getDDx () const |
| double | getDy () const |
| double | getDDy () const |
| double | getDebyeLength () const |
| double | getMeanGammaZ () const |
| double | getTemperature () const |
| double | getPlasmaParameter () const |
| double | computeDebyeLength (double density) |
| void | setQ (double q) |
| Set particle charge for the active Q storage mode. | |
| double | getChargePerParticle () const |
| Get charge per particle [Cb]. | |
| double | getTotalCharge () const |
| Get total charge [Cb] in this container. | |
| void | setM (double m) |
| Set particle mass for the active M storage mode. | |
| double | getMassPerParticle () const |
| Get mass per particle [GeV]. | |
| double | getTotalMass () const |
| Get total mass [GeV] in this container. | |
| const Vector_t< double, Dim > & | getRefPartR () const |
| Get the reference particle position (const). | |
| Vector_t< double, Dim > & | getRefPartR () |
| Get the reference particle position. | |
| void | setRefPartR (const Vector_t< double, Dim > &refPartR) |
| Set the reference particle position. | |
| const Vector_t< double, Dim > & | getRefPartP () const |
| Get the reference particle momentum (const). | |
| Vector_t< double, Dim > & | getRefPartP () |
| Get the reference particle momentum. | |
| void | setRefPartP (const Vector_t< double, Dim > &refPartP) |
| Set the reference particle momentum. | |
| void | setReference (const PartData *ref) |
| Set reference particle data. | |
| const PartData * | getReference () const |
| Get reference particle data. | |
| void | set_sPos (double sPos) |
| Set longitudinal position along design trajectory. | |
| double | get_sPos () const |
| Get longitudinal position along design trajectory. | |
| void | setGlobalToLocalQuaternion (const Quaternion_t &globalToLocalQuaternion) |
| Set global-to-local rotation quaternion. | |
| Quaternion_t | getGlobalToLocalQuaternion () const |
| Get global-to-local rotation quaternion. | |
| const CoordinateSystemTrafo & | getToLabTrafo () const |
| Get local-to-lab coordinate transformation (const). | |
| CoordinateSystemTrafo & | getToLabTrafo () |
| Get local-to-lab coordinate transformation. | |
| void | setToLabTrafo (const CoordinateSystemTrafo &toLabTrafo) |
| Set local-to-lab coordinate transformation. | |
| void | updateRefToLabCSTrafo (double bunchDT) |
| Advance reference/lab transform state and map bunch accordingly. | |
| template<typename Pusher > | |
| void | applyFractionalStep (const Pusher &pusher, double tau, double pathLengthTarget) |
| Apply a fractional Boris step and update reference/lab transform state. | |
| void | scaleDtByCharge () |
| Scale particle time-step weights by charge before scatter. | |
| void | unscaleDtByCharge () |
Restore original dt values after scaleDtByCharge(). | |
| void | switchToUnitlessPositions () |
| Transform positions to unitless coordinates using each particle's dt[i]. | |
| void | switchOffUnitlessPositions () |
| Restore physical positions from unitless form using each particle's dt[i]. | |
| QMStorageMode | getQMStorageMode () const |
| void | setGlobalProcesses (std::vector< std::unique_ptr< GlobalProcess > > processes) |
| const std::vector< std::unique_ptr< GlobalProcess > > & | getGlobalProcesses () const |
| size_type | markParticlesOutside (double sigmasAway) |
| Mark particles whose position is more than sigmasAway standard deviations from the bunch mean in any spatial dimension. | |
| void | createParticles (size_type numParticles) |
| Create/allocate a specified number of particles. | |
| void | allocateParticles (size_type numParticles) |
| size_type | deleteInvalidParticles () |
| Delete particles currently marked in InvalidMask. | |
Public Attributes | |
| ippl::ParticleAttrib< double > | dt |
| timestep in [s] | |
| ippl::ParticleAttrib< double > | Phi |
| the scalar potential in [Cb/s] | |
| ippl::ParticleAttrib< bin_index_type > | Bin |
| the energy bin the particle is in | |
| short | Sp = 0 |
| the particle specis | |
| Base::particle_position_type | P |
| particle momenta [\beta\gamma] | |
| Base::particle_position_type | E |
| electric field at particle position | |
| Base::particle_position_type | B |
| electric field for gun simulation with bins | |
| ippl::ParticleAttrib< bool > | InvalidMask |
| particle deletion mask (indicates which particles are deleted every timestep) | |
| ippl::ParticleAttrib< spin_vector_type > | Pol |
Private Types | |
| using | Base = ippl::ParticleBase< ippl::ParticleSpatialLayout< T, Dim >, Kokkos::DefaultExecutionSpace::memory_space > |
Alias for the ippl::ParticleBase specialization this container inherits from. | |
Private Member Functions | |
| void | setBCAllPeriodic () |
Private Attributes | |
| PLayout_t< T, Dim > | pl_m |
| QMStorageMode | qmStorageMode_m = QMStorageMode::SingleValue |
| DistributionMoments | distMoments_m |
| std::shared_ptr< BunchStateHandler::ContainerState > | containerState_m |
| qm_view_type | QView_m |
| qm_view_type | MView_m |
| ippl::ParticleAttrib< double > | QAttr |
| ippl::ParticleAttrib< double > | MAttr |
| bool | spinEnabled_m = false |
| Vector_t< double, Dim > | refPartR_m |
| Vector_t< double, Dim > | refPartP_m |
| Quaternion_t | globalToLocalQuaternion_m |
| CoordinateSystemTrafo | toLabTrafo_m |
| const PartData * | reference_m = nullptr |
| double | sPos_m = 0.0 |
| std::vector< std::unique_ptr< GlobalProcess > > | globalProcesses_m |
| Global physics processes attached to this container. | |
Container for all per-particle (and per-simulation) fields tracked during OPALX tracking.
The values tracked in Kokkos::Views during the simulation are: R - Position (from base class) P - Momentum [beta*gamma] dt - Time step Phi- Scalar potential Bin- Energy bin E - Electric field B - Magnetic field
Charge (Q) and mass (M):
getQView() / getMView() returns the shared views.getQView() / getMView() returns the per-particle attribute views.Access to Q/M should be done with getQView() / getMView(). They automatically select the correct underlying storage mode.
Definition at line 62 of file ParticleContainer.hpp.
|
private |
Alias for the ippl::ParticleBase specialization this container inherits from.
The second template argument is a parameter pack of Kokkos view properties forwarded to the optional ID attribute's storage. IPPL gates the ID attribute on sizeof...(IDProperties) > 0, so passing any property here turns IDs ON; an empty pack would leave them disabled. We pass Kokkos::DefaultExecutionSpace::memory_space so the ID view lives in the same space as the rest of the bunch (host or device, matching the build backend). With IDs enabled, IPPL auto-assigns globally unique std::int64_t IDs in Base::create().
Definition at line 76 of file ParticleContainer.hpp.
| using ParticleContainer< T, Dim >::bin_index_type = short int |
Defines which type to use as a particle bin.
Definition at line 93 of file ParticleContainer.hpp.
| using ParticleContainer< T, Dim >::qm_view_type = typename ippl::ParticleAttrib<double>::view_type |
View types of Q and M values.
Definition at line 96 of file ParticleContainer.hpp.
| using ParticleContainer< T, Dim >::spin_vector_type = ippl::Vector<float, 3> |
Per-particle polarization vector type: 3D vector in single precision, |Pol| in [0, 1]. Polarization observables are typically ~1% accurate, so float storage is sufficient and halves the memory footprint versus the codebase's standard double attributes. Dynamics kernels should still compute in double and cast back on store.
Definition at line 102 of file ParticleContainer.hpp.
|
strong |
| Enumerator | |
|---|---|
| SingleValue | |
| Attributes | |
Definition at line 90 of file ParticleContainer.hpp.
|
inline |
Definition at line 161 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::MView_m, ParticleContainer< T, Dim >::pl_m, ParticleContainer< T, Dim >::QView_m, ParticleContainer< T, Dim >::registerAttributes(), and ParticleContainer< T, Dim >::setupBCs().

|
inline |
Definition at line 177 of file ParticleContainer.hpp.
|
inline |
Definition at line 703 of file ParticleContainer.hpp.
|
inline |
Apply a fractional Boris step and update reference/lab transform state.
Definition at line 462 of file ParticleContainer.hpp.
References Physics::c, getQuaternion(), CoordinateSystemTrafo::inverted(), ParticleContainer< T, Dim >::P, ParticleContainer< T, Dim >::refPartP_m, ParticleContainer< T, Dim >::refPartR_m, CoordinateSystemTrafo::rotateFrom(), ParticleContainer< T, Dim >::sPos_m, ParticleContainer< T, Dim >::toLabTrafo_m, and CoordinateSystemTrafo::transformFrom().

|
inline |
Definition at line 301 of file ParticleContainer.hpp.
References DistributionMoments::computeDebyeLength(), ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getDebyeLength().

|
inline |
Definition at line 262 of file ParticleContainer.hpp.
References DistributionMoments::computeMinMaxPosition(), and ParticleContainer< T, Dim >::distMoments_m.

|
inline |
Create/allocate a specified number of particles.
This function creates a given number of particles in the container. It's a wrapper around the non destructive IPPL particle create function, but will print out a warning if the create call led to unnecessary reallocation (i.e. if the new total number of particles exceeds the previous capacity).
create is a collective call, so all MPI ranks must call this function. IPPL automatically handles the short-circuit if internal capacity is sufficient.| numParticles | The number of particles to create. |
Definition at line 655 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::B, ParticleContainer< T, Dim >::Bin, ParticleContainer< T, Dim >::dt, ParticleContainer< T, Dim >::E, ParticleContainer< T, Dim >::InvalidMask, and ParticleContainer< T, Dim >::Phi.
|
inline |
Delete particles currently marked in InvalidMask.
This is the only ParticleContainer function that is allowed to compact the IPPL particle arrays. All deletion producers must only update InvalidMask.
Definition at line 732 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::InvalidMask, and ParticleContainer< T, Dim >::markMomentsDirty().

|
inline |
Get longitudinal position along design trajectory.
Definition at line 427 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::sPos_m.
|
inline |
Definition at line 279 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getCentroid().

|
inline |
Get charge per particle [Cb].
Definition at line 335 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::Attributes, ParticleContainer< T, Dim >::QAttr, ParticleContainer< T, Dim >::qmStorageMode_m, and ParticleContainer< T, Dim >::QView_m.
Referenced by ParticleContainer< T, Dim >::getTotalCharge().
|
inline |
Definition at line 271 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getMoments6x6().

|
inline |
Definition at line 287 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getDDx().

|
inline |
Definition at line 291 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getDDy().

|
inline |
Definition at line 293 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getDebyeLength().

|
inline |
Definition at line 285 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getDx().

|
inline |
Definition at line 289 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getDy().

|
inline |
Definition at line 283 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getGeometricEmittance().

|
inline |
Definition at line 584 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::globalProcesses_m.
|
inline |
Get global-to-local rotation quaternion.
Definition at line 435 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::globalToLocalQuaternion_m.
|
inline |
Get mass per particle [GeV].
Definition at line 375 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::Attributes, ParticleContainer< T, Dim >::MAttr, ParticleContainer< T, Dim >::MView_m, and ParticleContainer< T, Dim >::qmStorageMode_m.
Referenced by ParticleContainer< T, Dim >::getTotalMass().
|
inline |
Definition at line 269 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getMaxPosition().

|
inline |
Definition at line 295 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getMeanGammaZ().

|
inline |
Definition at line 273 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getMeanKineticEnergy().

|
inline |
Definition at line 252 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getMeanMomentum().

|
inline |
Definition at line 256 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getMeanPosition().
Referenced by ParticleContainer< T, Dim >::markParticlesOutside().

|
inline |
Definition at line 277 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getMeans().

|
inline |
Definition at line 267 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getMinPosition().

|
inline |
Mass view in [GeV]. In SingleValue mode this is a rank-1 view of length 1. In Attributes mode this is the per-particle attribute view.
Definition at line 118 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::Attributes, ParticleContainer< T, Dim >::MAttr, ParticleContainer< T, Dim >::MView_m, and ParticleContainer< T, Dim >::qmStorageMode_m.
Referenced by ParticleContainer< T, Dim >::updateMoments().
|
inline |
Definition at line 281 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getNormalizedEmittance().

|
inline |
Definition at line 207 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::pl_m.
|
inline |
Definition at line 299 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getPlasmaParameter().

|
inline |
Definition at line 578 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::qmStorageMode_m.
|
inline |
Charge view in [Cb]. In SingleValue mode this is a rank-1 view of length 1. In Attributes mode this is the per-particle attribute view.
Definition at line 108 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::Attributes, ParticleContainer< T, Dim >::QAttr, ParticleContainer< T, Dim >::qmStorageMode_m, and ParticleContainer< T, Dim >::QView_m.
|
inline |
Get reference particle data.
Definition at line 421 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::reference_m.
Referenced by ParallelTracker::kickParticles().
|
inline |
Get the reference particle momentum.
Definition at line 406 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::refPartP_m.
|
inline |
Get the reference particle momentum (const).
Definition at line 403 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::refPartP_m.
|
inline |
Get the reference particle position.
Definition at line 397 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::refPartR_m.
|
inline |
Get the reference particle position (const).
Definition at line 394 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::refPartR_m.
|
inline |
Definition at line 254 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getStandardDeviationMomentum().

|
inline |
Definition at line 258 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getStandardDeviationPosition().
Referenced by ParticleContainer< T, Dim >::markParticlesOutside().

|
inline |
Definition at line 260 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getStandardDeviationRP().

|
inline |
Definition at line 275 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getStdKineticEnergy().

|
inline |
Definition at line 297 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::getTemperature().

|
inline |
Get local-to-lab coordinate transformation.
Definition at line 441 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::toLabTrafo_m.
|
inline |
Get local-to-lab coordinate transformation (const).
Definition at line 438 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::toLabTrafo_m.
|
inline |
Get total charge [Cb] in this container.
Definition at line 351 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::getChargePerParticle().

|
inline |
Get total mass [GeV] in this container.
Definition at line 391 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::getMassPerParticle().

|
inline |
Returns true when per-particle spin storage was enabled at construction (enabled per beam when the BEAM has POLARIZATION set).
Definition at line 159 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::spinEnabled_m.
Referenced by Decay::apply().
|
inline |
Definition at line 223 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::containerState_m.
|
inline |
Definition at line 221 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::containerState_m.
|
inline |
Definition at line 225 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::containerState_m.
|
inline |
Definition at line 224 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::containerState_m.
Referenced by ParticleContainer< T, Dim >::deleteInvalidParticles(), ParallelTracker::kickParticles(), ParticleContainer< T, Dim >::markParticlesOutside(), and ParallelTracker::pushParticles().
|
inline |
Mark particles whose position is more than sigmasAway standard deviations from the bunch mean in any spatial dimension.
Recomputes distribution moments, then ORs the outlier decision into InvalidMask. Deletion is intentionally deferred to deleteInvalidParticles().
| sigmasAway | Number of standard deviations defining the boundary. |
Definition at line 598 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::getMeanR(), ParticleContainer< T, Dim >::getRmsR(), ParticleContainer< T, Dim >::InvalidMask, ParticleContainer< T, Dim >::markMomentsDirty(), and ParticleContainer< T, Dim >::updateMoments().

|
inline |
Definition at line 179 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::Attributes, ParticleContainer< T, Dim >::B, ParticleContainer< T, Dim >::Bin, ParticleContainer< T, Dim >::dt, ParticleContainer< T, Dim >::E, ParticleContainer< T, Dim >::InvalidMask, ParticleContainer< T, Dim >::MAttr, ParticleContainer< T, Dim >::P, ParticleContainer< T, Dim >::Phi, ParticleContainer< T, Dim >::Pol, ParticleContainer< T, Dim >::QAttr, ParticleContainer< T, Dim >::qmStorageMode_m, and ParticleContainer< T, Dim >::spinEnabled_m.
Referenced by ParticleContainer< T, Dim >::ParticleContainer().
|
inline |
Scale particle time-step weights by charge before scatter.
Multiplies each local dt[i] by the corresponding charge used for deposition. In QMStorageMode::Attributes, the per-particle QAttr(i) is used. In QMStorageMode::SingleValue, the shared scalar QView_m(0) is used.
Definition at line 484 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::Attributes, ParticleContainer< T, Dim >::dt, ParticleContainer< T, Dim >::QAttr, ParticleContainer< T, Dim >::qmStorageMode_m, and ParticleContainer< T, Dim >::QView_m.
|
inline |
Set longitudinal position along design trajectory.
Definition at line 424 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::sPos_m.
|
inlineprivate |
Definition at line 780 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::setupBCs().
|
inline |
Definition at line 209 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::containerState_m, ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::setContainerState().

|
inline |
Definition at line 248 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::distMoments_m, and DistributionMoments::setEnergyReferenceMass().
Referenced by ParticleContainer< T, Dim >::setReference().

|
inline |
Definition at line 580 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::globalProcesses_m.
|
inline |
Set global-to-local rotation quaternion.
Definition at line 430 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::globalToLocalQuaternion_m.
|
inline |
Set particle mass for the active M storage mode.
| m | Mass value in [GeV]. |
In QMStorageMode::Attributes, this assigns m to every local particle. In QMStorageMode::SingleValue, this updates the shared scalar mass view.
Definition at line 360 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::Attributes, ParticleContainer< T, Dim >::MAttr, ParticleContainer< T, Dim >::MView_m, and ParticleContainer< T, Dim >::qmStorageMode_m.
|
inline |
Set particle charge for the active Q storage mode.
| q | Charge value in [Cb]. |
In QMStorageMode::Attributes, this assigns q to every local particle. In QMStorageMode::SingleValue, this updates the shared scalar charge view.
Definition at line 318 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::Attributes, ParticleContainer< T, Dim >::QAttr, ParticleContainer< T, Dim >::qmStorageMode_m, and ParticleContainer< T, Dim >::QView_m.
|
inline |
Set reference particle data.
Definition at line 412 of file ParticleContainer.hpp.
References Units::eV2GeV, PartData::getM(), ParticleContainer< T, Dim >::reference_m, and ParticleContainer< T, Dim >::setEnergyReferenceMass().

|
inline |
Set the reference particle momentum.
Definition at line 409 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::refPartP_m.
|
inline |
Set the reference particle position.
Definition at line 400 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::refPartR_m.
|
inline |
Set local-to-lab coordinate transformation.
Definition at line 444 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::toLabTrafo_m.
|
inline |
Definition at line 197 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::setBCAllPeriodic().
Referenced by ParticleContainer< T, Dim >::ParticleContainer().

|
inline |
Restore physical positions from unitless form using each particle's dt[i].
Applies \( R_i = R'_i \, c \, dt_i \).
| OpalException | if this container is not currently in unitless positions. |
Definition at line 563 of file ParticleContainer.hpp.
References Physics::c, and ParticleContainer< T, Dim >::containerState_m.
Referenced by ParallelTracker::pushParticles().
|
inline |
Transform positions to unitless coordinates using each particle's dt[i].
Applies \( R'_i = R_i / (c \, dt_i) \). Requires valid non-zero dt values per particle.
| OpalException | if this container is already in unitless positions. |
Definition at line 540 of file ParticleContainer.hpp.
References Physics::c, and ParticleContainer< T, Dim >::containerState_m.
Referenced by ParallelTracker::pushParticles().
|
inline |
Apply coordinate transform to local particles: translate R, rotate P, E, B.
Definition at line 200 of file ParticleContainer.hpp.
References CoordinateSystemTrafo::rotateBunchTo(), and CoordinateSystemTrafo::transformBunchTo().
Referenced by ParticleContainer< T, Dim >::updateRefToLabCSTrafo().

|
inline |
Restore original dt values after scaleDtByCharge().
Divides each local dt[i] by the same charge factor applied in scaleDtByCharge().
Definition at line 512 of file ParticleContainer.hpp.
References ParticleContainer< T, Dim >::Attributes, ParticleContainer< T, Dim >::dt, ParticleContainer< T, Dim >::QAttr, ParticleContainer< T, Dim >::qmStorageMode_m, and ParticleContainer< T, Dim >::QView_m.
|
inline |
Definition at line 227 of file ParticleContainer.hpp.
References DistributionMoments::computeMoments(), ParticleContainer< T, Dim >::containerState_m, ParticleContainer< T, Dim >::distMoments_m, and ParticleContainer< T, Dim >::getMView().
Referenced by ParticleContainer< T, Dim >::markParticlesOutside().

|
inline |
Advance reference/lab transform state and map bunch accordingly.
Definition at line 447 of file ParticleContainer.hpp.
References getQuaternion(), CoordinateSystemTrafo::inverted(), ParticleContainer< T, Dim >::P, ParticleContainer< T, Dim >::refPartP_m, ParticleContainer< T, Dim >::refPartR_m, CoordinateSystemTrafo::rotateFrom(), ParticleContainer< T, Dim >::sPos_m, ParticleContainer< T, Dim >::toLabTrafo_m, ParticleContainer< T, Dim >::transformBunch(), and CoordinateSystemTrafo::transformFrom().

| Base::particle_position_type ParticleContainer< T, Dim >::B |
electric field for gun simulation with bins
magnetic field at particle position
Definition at line 147 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::createParticles(), ParallelTracker::kickParticles(), and ParticleContainer< T, Dim >::registerAttributes().
| ippl::ParticleAttrib<bin_index_type> ParticleContainer< T, Dim >::Bin |
the energy bin the particle is in
Definition at line 132 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::createParticles(), and ParticleContainer< T, Dim >::registerAttributes().
|
private |
Per-container state slot allocated by the handler at setBunchStateHandler. Owned here as the only strong reference; the handler keeps a weak_ptr, so destroying this container automatically releases the slot. The slot's own methods handle MPI consistency, so no direct handler reference is needed.
Definition at line 792 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::isMomentsDirty(), ParticleContainer< T, Dim >::isUnitlessPositions(), ParticleContainer< T, Dim >::markMomentsClean(), ParticleContainer< T, Dim >::markMomentsDirty(), ParticleContainer< T, Dim >::setBunchStateHandler(), ParticleContainer< T, Dim >::switchOffUnitlessPositions(), ParticleContainer< T, Dim >::switchToUnitlessPositions(), and ParticleContainer< T, Dim >::updateMoments().
|
private |
Definition at line 786 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::computeDebyeLength(), ParticleContainer< T, Dim >::computeMinMaxR(), ParticleContainer< T, Dim >::getCentroid(), ParticleContainer< T, Dim >::getCovMatrix(), ParticleContainer< T, Dim >::getDDx(), ParticleContainer< T, Dim >::getDDy(), ParticleContainer< T, Dim >::getDebyeLength(), ParticleContainer< T, Dim >::getDx(), ParticleContainer< T, Dim >::getDy(), ParticleContainer< T, Dim >::getGeometricEmit(), ParticleContainer< T, Dim >::getMaxR(), ParticleContainer< T, Dim >::getMeanGammaZ(), ParticleContainer< T, Dim >::getMeanKineticEnergy(), ParticleContainer< T, Dim >::getMeanP(), ParticleContainer< T, Dim >::getMeanR(), ParticleContainer< T, Dim >::getMeans(), ParticleContainer< T, Dim >::getMinR(), ParticleContainer< T, Dim >::getNormEmit(), ParticleContainer< T, Dim >::getPlasmaParameter(), ParticleContainer< T, Dim >::getRmsP(), ParticleContainer< T, Dim >::getRmsR(), ParticleContainer< T, Dim >::getRmsRP(), ParticleContainer< T, Dim >::getStdKineticEnergy(), ParticleContainer< T, Dim >::getTemperature(), ParticleContainer< T, Dim >::setBunchStateHandler(), ParticleContainer< T, Dim >::setEnergyReferenceMass(), and ParticleContainer< T, Dim >::updateMoments().
| ippl::ParticleAttrib<double> ParticleContainer< T, Dim >::dt |
timestep in [s]
Definition at line 126 of file ParticleContainer.hpp.
Referenced by Decay::apply(), ParticleContainer< T, Dim >::createParticles(), ParallelTracker::kickParticles(), ParticleContainer< T, Dim >::registerAttributes(), ParticleContainer< T, Dim >::scaleDtByCharge(), and ParticleContainer< T, Dim >::unscaleDtByCharge().
| Base::particle_position_type ParticleContainer< T, Dim >::E |
electric field at particle position
Definition at line 141 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::createParticles(), ParallelTracker::kickParticles(), and ParticleContainer< T, Dim >::registerAttributes().
|
private |
Global physics processes attached to this container.
Definition at line 822 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::getGlobalProcesses(), and ParticleContainer< T, Dim >::setGlobalProcesses().
|
private |
Definition at line 810 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::getGlobalToLocalQuaternion(), and ParticleContainer< T, Dim >::setGlobalToLocalQuaternion().
| ippl::ParticleAttrib<bool> ParticleContainer< T, Dim >::InvalidMask |
particle deletion mask (indicates which particles are deleted every timestep)
Definition at line 150 of file ParticleContainer.hpp.
Referenced by Decay::apply(), ParticleContainer< T, Dim >::createParticles(), ParticleContainer< T, Dim >::deleteInvalidParticles(), ParticleContainer< T, Dim >::markParticlesOutside(), and ParticleContainer< T, Dim >::registerAttributes().
|
private |
Definition at line 800 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::getMassPerParticle(), ParticleContainer< T, Dim >::getMView(), ParticleContainer< T, Dim >::registerAttributes(), and ParticleContainer< T, Dim >::setM().
|
private |
Definition at line 796 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::getMassPerParticle(), ParticleContainer< T, Dim >::getMView(), ParticleContainer< T, Dim >::ParticleContainer(), and ParticleContainer< T, Dim >::setM().
| Base::particle_position_type ParticleContainer< T, Dim >::P |
particle momenta [\beta\gamma]
Definition at line 138 of file ParticleContainer.hpp.
Referenced by Decay::apply(), ParticleContainer< T, Dim >::applyFractionalStep(), ParallelTracker::kickParticles(), ParallelTracker::pushParticles(), ParticleContainer< T, Dim >::registerAttributes(), and ParticleContainer< T, Dim >::updateRefToLabCSTrafo().
| ippl::ParticleAttrib<double> ParticleContainer< T, Dim >::Phi |
the scalar potential in [Cb/s]
Definition at line 129 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::createParticles(), and ParticleContainer< T, Dim >::registerAttributes().
Definition at line 782 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::getPL(), and ParticleContainer< T, Dim >::ParticleContainer().
| ippl::ParticleAttrib<spin_vector_type> ParticleContainer< T, Dim >::Pol |
Per-particle polarization vector P (rest-frame Pauli expectation values along lab-frame axes; |Pol| in [0, 1]). Registered only when spinEnabled_m is true. Storage is float to halve memory; kernels should compute in double and cast.
Definition at line 155 of file ParticleContainer.hpp.
Referenced by Decay::apply(), and ParticleContainer< T, Dim >::registerAttributes().
|
private |
Definition at line 799 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::getChargePerParticle(), ParticleContainer< T, Dim >::getQView(), ParticleContainer< T, Dim >::registerAttributes(), ParticleContainer< T, Dim >::scaleDtByCharge(), ParticleContainer< T, Dim >::setQ(), and ParticleContainer< T, Dim >::unscaleDtByCharge().
|
private |
Definition at line 784 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::getChargePerParticle(), ParticleContainer< T, Dim >::getMassPerParticle(), ParticleContainer< T, Dim >::getMView(), ParticleContainer< T, Dim >::getQMStorageMode(), ParticleContainer< T, Dim >::getQView(), ParticleContainer< T, Dim >::registerAttributes(), ParticleContainer< T, Dim >::scaleDtByCharge(), ParticleContainer< T, Dim >::setM(), ParticleContainer< T, Dim >::setQ(), and ParticleContainer< T, Dim >::unscaleDtByCharge().
|
private |
Definition at line 795 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::getChargePerParticle(), ParticleContainer< T, Dim >::getQView(), ParticleContainer< T, Dim >::ParticleContainer(), ParticleContainer< T, Dim >::scaleDtByCharge(), ParticleContainer< T, Dim >::setQ(), and ParticleContainer< T, Dim >::unscaleDtByCharge().
|
private |
Definition at line 816 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::getReference(), and ParticleContainer< T, Dim >::setReference().
|
private |
Definition at line 807 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::applyFractionalStep(), ParticleContainer< T, Dim >::getRefPartP(), ParticleContainer< T, Dim >::getRefPartP(), ParticleContainer< T, Dim >::setRefPartP(), and ParticleContainer< T, Dim >::updateRefToLabCSTrafo().
|
private |
Definition at line 806 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::applyFractionalStep(), ParticleContainer< T, Dim >::getRefPartR(), ParticleContainer< T, Dim >::getRefPartR(), ParticleContainer< T, Dim >::setRefPartR(), and ParticleContainer< T, Dim >::updateRefToLabCSTrafo().
| short ParticleContainer< T, Dim >::Sp = 0 |
the particle specis
Definition at line 135 of file ParticleContainer.hpp.
|
private |
Definition at line 803 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::hasSpin(), and ParticleContainer< T, Dim >::registerAttributes().
|
private |
Definition at line 819 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::applyFractionalStep(), ParticleContainer< T, Dim >::get_sPos(), ParticleContainer< T, Dim >::set_sPos(), and ParticleContainer< T, Dim >::updateRefToLabCSTrafo().
|
private |
Definition at line 813 of file ParticleContainer.hpp.
Referenced by ParticleContainer< T, Dim >::applyFractionalStep(), ParticleContainer< T, Dim >::getToLabTrafo(), ParticleContainer< T, Dim >::getToLabTrafo(), ParticleContainer< T, Dim >::setToLabTrafo(), and ParticleContainer< T, Dim >::updateRefToLabCSTrafo().