This change fixes the metal cooling rate, using MetalCooling=1, which was missing a factor of density previously. Ji-hoon gets credit for this one.
Does this work independent of the metal fraction / metal density issue reported a few months ago on the mailing list?
Are you talking about the message from Yuu Niino? Or the discussion about advecting the metal fields in MHD sims? Either way, this isn't related to that issue and only affects the cooling rates and not the metal densities.
I meant the latter, but I think I was confused; I think I mentally inserted a multiplication by the metal field in here, in which case fraction/density would have been important. Apologies for the noise.
I've tested this using the CoolingTest and it now gives the right behavior. Unfortunately, the CoolingTest was set up to test the cooling rate at n = 1 cm^-3, which is right where the cooling would be equal with this bug. I will accept this PR and update the cooling tests to better test the density dependence.