DiffusionSim implementation.