  We revisit techniques for performing cosmological simulations with both
baryons and cold dark matter when each fluid has different initial conditions,
as is the case at the end of the radiation era. Most simulations do not
reproduce the linear prediction for the difference between the cold dark matter
and baryon perturbations. We show that this is due to the common use of offset
regular grids when setting up the particle initial conditions. The correct
behaviour can be obtained without any loss of simulation resolution by using a
Lagrangian glass for the baryon particles. We further show that the difference
between cold dark matter and baryons may affect predictions for the Lyman-alpha
forest flux power spectrum at the 5% level, potentially impacting current
cosmological constraints.
