-
Notifications
You must be signed in to change notification settings - Fork 332
Description
Hello,
I’m working on a dark matter model with a transition at a specific redshift z_tr. Instead of using a Heaviside function directly, I have used a simple condition in the code like:
if (pba->has_cdm == TRUE) {
if (a > 1./(1.+z_tr)) {
pvecback[pba->index_bg_rho_cdm] = expression_1;
} else {
pvecback[pba->index_bg_rho_cdm] = expression_2;
}
rho_tot += pvecback[pba->index_bg_rho_cdm];
rho_m += pvecback[pba->index_bg_rho_cdm];
p_tot += 0.;
}
My goal is to simulate a transition in the background evolution, and I want to confirm whether this kind of implementation is sufficient within the CLASS framework. Is this conditional statement enough to define a sharp transition in the energy density of dark matter in CLASS, or are there additional changes needed.
Also, is there a recommended way to implement a smooth or sharp Heaviside step in CLASS?
Thank you for your help!