I discovered a thing that I should have improved in the template. As written now in the template one has to take in OmegaLambda and then set OmegaK by hand. What I should have done is the other way around - this makes more sense as we are always dealing with a flat Universe here (so one does not have to adjust the input to get a flat Universe). One can of course deal with this in the constructor by just setting OmegaK = 0 and then recomputing OmegaLambda = 1 - Sum Omega's, but one can also update the methods to make it logically consistent (which I will do for next year - have updated the GitHub now). If you want to update this in your code then what one can do is to just make a few changes to the methods:
In Main.cpp:
// Background parameters
double h = 0.674;
double OmegaB = 0.05;
double OmegaCDM = 0.267;
double OmegaK = 0.0; // XXX Change OmegaLambda->OmegaK
double Neff = 3.046;
double TCMB = 2.7255;
// Recombination parameters
double Yp = 0.245;
// Module I
// Set up and solve the background
BackgroundCosmology cosmo(h, OmegaB, OmegaCDM, OmegaK, Neff, TCMB); // XXX Change OmegaLambda->OmegaK
In BackgroundCosmology.cpp:
BackgroundCosmology::BackgroundCosmology(
double h,
double OmegaB,
double OmegaCDM,
double OmegaK, // XXX Change OmegaLambda->OmegaK
double Neff,
double TCMB) :
h(h),
OmegaB(OmegaB),
OmegaCDM(OmegaCDM),
OmegaK(OmegaK), // XXX Change OmegaLambda->OmegaK
Neff(Neff),
TCMB(TCMB)
{
...
...
// XXX Compute OmegaLambda
OmegaLambda = 1 - OmegaK - OmegaB - OmegaCDM - OmegaR - OmegaNu;
}