Particle swarms in confining geometries