mirror of
https://github.com/cosmo-sims/monofonIC.git
synced 2024-09-19 17:03:45 +02:00
fixed a problem when not using nCDM in CLASS
This commit is contained in:
parent
3e33202aa6
commit
736c57c7dd
1 changed files with 19 additions and 13 deletions
|
@ -173,13 +173,19 @@ private:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//... CDM density parameter
|
||||||
add_class_parameter("Omega_cdm", std::max(omega_c_, 1e-9));
|
add_class_parameter("Omega_cdm", std::max(omega_c_, 1e-9));
|
||||||
|
|
||||||
|
//... massive neutrinos or other non-cold DM species (nCDM), if any
|
||||||
|
if (N_nu_massive_ > 0 || N_ncdm_ > 0)
|
||||||
|
{
|
||||||
|
add_class_parameter("N_ncdm", N_nu_massive_ + N_ncdm_);
|
||||||
add_class_parameter("Omega_ncdm", sstr_omega.str().c_str());
|
add_class_parameter("Omega_ncdm", sstr_omega.str().c_str());
|
||||||
add_class_parameter("m_ncdm", sstr_m.str().c_str());
|
add_class_parameter("m_ncdm", sstr_m.str().c_str());
|
||||||
add_class_parameter("T_ncdm", sstr_T.str().c_str());
|
add_class_parameter("T_ncdm", sstr_T.str().c_str());
|
||||||
|
|
||||||
add_class_parameter("N_ncdm", cosmo_params_.get("N_nu_massive") + N_ncdm_);
|
// add_class_parameter("N_ncdm", cosmo_params_.get("N_nu_massive") + N_ncdm_);
|
||||||
|
}
|
||||||
|
|
||||||
//--- cosmological parameters, primordial -------------------------
|
//--- cosmological parameters, primordial -------------------------
|
||||||
add_class_parameter("P_k_ini type", "analytic_Pk");
|
add_class_parameter("P_k_ini type", "analytic_Pk");
|
||||||
|
@ -236,12 +242,12 @@ private:
|
||||||
zlist << std::max(ztarget_, zstart_) << ", " << std::min(ztarget_, zstart_) << ", 0.0";
|
zlist << std::max(ztarget_, zstart_) << ", " << std::min(ztarget_, zstart_) << ", 0.0";
|
||||||
add_class_parameter("z_pk", zlist.str());
|
add_class_parameter("z_pk", zlist.str());
|
||||||
|
|
||||||
music::ilog << ">>> Computing transfer function via ClassEngine..." << std::endl;
|
music::CODE_PART_msg("Computing transfer function via ClassEngine");
|
||||||
double wtime = get_wtime();
|
double wtime = get_wtime();
|
||||||
|
|
||||||
the_ClassEngine_ = std::make_unique<ClassEngine>(pars_, false);
|
the_ClassEngine_ = std::make_unique<ClassEngine>(pars_, false);
|
||||||
|
music::CODE_PART_COMPLETE_msg(get_wtime() - wtime);
|
||||||
music::ilog << std::setw(70) << std::setfill(' ') << std::right << "took : " << std::setw(8) << get_wtime() - wtime << "s" << std::endl;
|
// music::ilog << std::setw(70) << std::setfill(' ') << std::right << "took : " << std::setw(8) << get_wtime() - wtime << "s" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! run ClassEngine with parameters set up
|
//! run ClassEngine with parameters set up
|
||||||
|
@ -451,7 +457,7 @@ public:
|
||||||
kmin_ = k[0];
|
kmin_ = k[0];
|
||||||
kmax_ = k.back();
|
kmax_ = k.back();
|
||||||
|
|
||||||
music::ilog << "CLASS table contains k = " << this->get_kmin() << " to " << this->get_kmax() << " h Mpc-1." << std::endl;
|
// music::ilog << "CLASS table contains k = " << this->get_kmin() << " to " << this->get_kmax() << " h Mpc-1." << std::endl;
|
||||||
|
|
||||||
tf_distinct_ = true;
|
tf_distinct_ = true;
|
||||||
tf_withvel_ = true;
|
tf_withvel_ = true;
|
||||||
|
|
Loading…
Reference in a new issue