Skip to main content

move_particles_with_offset

Function move_particles_with_offset 

Source
pub fn move_particles_with_offset<TUnit, TMover>(
    mover: &TMover,
    common: &TMover::TCommon,
    particles: &mut [Particle<TUnit>],
    particle_rngs: &mut [SmallRng],
    base_idx: usize,
)
where TUnit: Unit, TMover: ParticleMover<TUnit = TUnit>, TMover::TCommon: Sync,
Expand description

Slice-and-offset variant of move_particles: the mover sees base_idx + i for the i-th particle, so a topology iterating over sub-slices still passes absolute swarm indices.