Commit ad51fcad authored by lesgourg's avatar lesgourg
Browse files

fixed minor issue with dcdm in input

parent 7e3ed1d3
......@@ -773,27 +773,32 @@ int input_read_parameters(
pba->Omega0_dcdmdr = param1;
if (flag2 == _TRUE_)
pba->Omega0_dcdmdr = param2/pba->h/pba->h;
Omega_tot += pba->Omega0_dcdmdr;
/** - Read Omega_ini_dcdm or omega_ini_dcdm */
class_call(parser_read_double(pfc,"Omega_ini_dcdm",&param1,&flag1,errmsg),
errmsg,
errmsg);
class_call(parser_read_double(pfc,"omega_ini_dcdm",&param2,&flag2,errmsg),
errmsg,
errmsg);
class_test(((flag1 == _TRUE_) && (flag2 == _TRUE_)),
errmsg,
"In input file, you can only enter one of Omega_ini_dcdm or omega_ini_dcdm, choose one");
if (flag1 == _TRUE_)
pba->Omega_ini_dcdm = param1;
if (flag2 == _TRUE_)
pba->Omega_ini_dcdm = param2/pba->h/pba->h;
if (pba->Omega0_dcdmdr > 0) {
Omega_tot += pba->Omega0_dcdmdr;
/** - Read Gamma in same units as H0, i.e. km/(s Mpc)*/
class_read_double("Gamma_dcdm",pba->Gamma_dcdm);
/* Convert to Mpc */
pba->Gamma_dcdm *= (1.e3 / _c_);
/** - Read Omega_ini_dcdm or omega_ini_dcdm */
class_call(parser_read_double(pfc,"Omega_ini_dcdm",&param1,&flag1,errmsg),
errmsg,
errmsg);
class_call(parser_read_double(pfc,"omega_ini_dcdm",&param2,&flag2,errmsg),
errmsg,
errmsg);
class_test(((flag1 == _TRUE_) && (flag2 == _TRUE_)),
errmsg,
"In input file, you can only enter one of Omega_ini_dcdm or omega_ini_dcdm, choose one");
if (flag1 == _TRUE_)
pba->Omega_ini_dcdm = param1;
if (flag2 == _TRUE_)
pba->Omega_ini_dcdm = param2/pba->h/pba->h;
/** - Read Gamma in same units as H0, i.e. km/(s Mpc)*/
class_read_double("Gamma_dcdm",pba->Gamma_dcdm);
/* Convert to Mpc */
pba->Gamma_dcdm *= (1.e3 / _c_);
}
/** - non-cold relics (ncdm) */
class_read_int("N_ncdm",N_ncdm);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment