Made FinalRedshift a global variable, rather than computing it each time the cosmology parameters were written.

#236 Merged at 4353f1b
  1. James Larrue

This solves the issue where the Final Redshift and StopTime parameters would drift away from the correct value after restarts.

The issue was that the StopTime was calculated from the FinalRedshift when the parameters were read, and then FinalRedshift was calculated from StopTime when the parameters were written. The result was that the FinalRedshift and StopTime values were slightly different between reading and writing. After each restart, the values would change a little more.

In this pull request, I made the FinalRedshift parameter a global constant, the same way that InitialRedshift is a global constant. StopTime is calculated from FinalRedshift, as before, but the value read as FinalRedshift is the value written.

Comments (1)