|
chombo-discharge
|
Minimal, payload-agnostic description of one particle as input to a distributed merge. More...
#include <CD_ParticleManagement.H>
Public Attributes | |
| RealVect | position = RealVect::Zero |
| Particle position. | |
| Real | weight = 0.0 |
| Particle weight. Not required to be an integer. | |
| ParticleID | globalID = -1 |
| Globally unique particle id, unique within one merge round across every rank. | |
| RankID | ownerRank = -1 |
| The rank owning this particle. Always read from the particle's own data, never inferred from MPI transport metadata. | |
| bool | isGhost = false |
| True iff this is a ghost copy in the patch currently holding it, i.e. not physically stored there. NOT the same question as ownerRank: a particle owned by this rank via one patch is still a ghost in a neighbouring patch this same rank owns. Used by the kd mergers; left false by the nearest-neighbor mergers, which track the distinction separately. | |
| int | level = 0 |
| The AMR level this particle lives on. Used by the nearest-neighbor mergers, whose cell keys are level-qualified; left at 0 by the kd mergers, which work in one patch's frame at a time. | |
| Packed | payload |
| Opaque, caller-defined payload. Never inspected by the merge logic – only carried through to the combine callback. | |
Minimal, payload-agnostic description of one particle as input to a distributed merge.
Shared by the kd-tree and nearest-neighbor mergers, which previously kept one of these each, differing by a single field. Carries what any of them needs: position and weight, a globally unique id, the owning rank, plus an opaque caller-defined payload the merge never inspects and only hands to the combine callback.
| Packed | Caller-defined payload type (e.g., a single Real energy for ItoParticle). |
| ParticleID ParticleManagement::MergeParticle< Packed >::globalID = -1 |
Globally unique particle id, unique within one merge round across every rank.
Defaults to -1, matching ParticleSoA::s_invalidID (not spelled as that constant, which is a member of a ParticleSoA instantiation this payload-agnostic struct has no business naming). The default matters because the cell-based mergers have no id fields to fill: without it the KD leaf builder would copy indeterminate values between daughters.