Skip to content

Commit

Permalink
Removed the planck_linear and planck_exponential parametrizations. Th…
Browse files Browse the repository at this point in the history
…ey are now included in the more general eft_power_law and eft_exponential
  • Loading branch information
Emilio Bellini committed May 19, 2017
1 parent 9164843 commit 0e80e99
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 68 deletions.
8 changes: 0 additions & 8 deletions hi_class.ini
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,13 @@ expansion_smg = 0.5 #this value will be overwritten using the closure equation.
schematic way it reads: exp(gi_0*pow(a,gi_exp))-1. You have to provide a vector
containing eight parameters, the four proportionality constants and the four
exponents of the scale factor
vi) "planck_linear": this parametrization depends on one single parameter. It was used
by the Planck collaboration in 1502.01590 (this reference provides all the details
about this parametrization)
vii) "planck_exponential": this parametrization depends on two parameters. It was used
by the Planck collaboration in 1502.01590 (this reference provides all the details
about this parametrization)
The parametrization you want to used is stored in the variable "gravity_model", while the
value of the parameters is stored in the vector "parameters_smg"
i) "propto_omega" -> x_k, x_b, x_m, x_t, M*^2_ini (default)
ii) "propto_scale" -> x_k, x_b, x_m, x_t, M*^2_ini
iii) "eft_propto_scale" -> delta_M_0, x_k, x_b, x_t, delta_M_0_exp, x_k_exp, x_b_exp, x_t_exp
iv) "eft_power_law" -> Om_0, g_1, g_2, g_3, Om_0_exp, g_1_exp, g_2_exp, g_3_exp
v) "eft_exponential" -> Om_0, g_1, g_2, g_3, Om_0_exp, g_1_exp, g_2_exp, g_3_exp
vi) "planck_linear" -> Omega_0
vii) "planck_exponential" -> alpha_M0, beta


gravity_model = propto_omega
Expand Down
2 changes: 1 addition & 1 deletion include/background.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "parser.h"

enum spatial_curvature {flat,open,closed};
enum gravity_model {propto_omega, propto_scale, eft_propto_scale, eft_power_law, eft_exponential, planck_linear, planck_exponential}; //write here the different models
enum gravity_model {propto_omega, propto_scale, eft_propto_scale, eft_power_law, eft_exponential}; //write here the different models

// initial conditions for the perturbations
enum pert_initial_conditions {single_clock, zero};
Expand Down
40 changes: 0 additions & 40 deletions source/background.c
Original file line number Diff line number Diff line change
Expand Up @@ -2206,16 +2206,6 @@ int background_initial_conditions(
pvecback_integration[pba->index_bi_M_pl_smg] = exp(pba->parameters_2_smg[0]*pow(a,pba->parameters_2_smg[4])) + exp(pba->parameters_2_smg[3]*pow(a,pba->parameters_2_smg[7])) -1.;
break;

case planck_linear:
//NOTE: The Planck collaboration decided to consider models with M_pl^2=1+\Omega. Here, even if we have an additional integration parameter (i.e. M_pl_ini), we decided to fix it to M_pl^2=1+a*Omega_0 in order to be coherent with the choice of the Planck collaboration.
pvecback_integration[pba->index_bi_M_pl_smg] = 1+a*pba->parameters_2_smg[0];
break;

case planck_exponential:
//NOTE: The Planck collaboration decided to consider models with M_pl^2=1+\Omega. Here, even if we have an additional integration parameter (i.e. M_pl_ini), we decided to fix M_pl^2=exp(alpha_M0*pow(a, beta)/beta) in order to be coherent with the choice of the Planck collaboration.
pvecback_integration[pba->index_bi_M_pl_smg] = exp(pba->parameters_2_smg[0]*pow(a, pba->parameters_2_smg[1])/pba->parameters_2_smg[1]);
break;

}

if (pba->M_pl_evolution_smg == _TRUE_)
Expand Down Expand Up @@ -2630,30 +2620,6 @@ int background_gravity_functions(
pvecback[pba->index_bg_M2_smg] = M_pl;

}
else if (pba->gravity_model_smg == planck_linear) {
//NOTE: With this parametrization every function it is expressed analytically. Then, it is possible to choose both to take the derivative of M_pl to obtain alpha_M or to integrate alpha_M to obtain M_pl. Even if the two results are undistinguishable, we choose the latter option, since in Class integrals are more stable numerically.

double Omega = a*pba->parameters_2_smg[0];

pvecback[pba->index_bg_tensor_excess_smg] = 0.;
pvecback[pba->index_bg_mpl_running_smg] = Omega/(1.+Omega);
pvecback[pba->index_bg_braiding_smg] = -pvecback[pba->index_bg_mpl_running_smg];
pvecback[pba->index_bg_kineticity_smg] = 3.*((2.+3.*Omega)*(pvecback[pba->index_bg_rho_smg]+pvecback[pba->index_bg_p_smg])+Omega*(pvecback[pba->index_bg_rho_tot_wo_smg]+pvecback[pba->index_bg_p_tot_wo_smg]))/2./(1.+Omega)/rho_tot;
pvecback[pba->index_bg_M2_smg] = M_pl;
}
else if (pba->gravity_model_smg == planck_exponential) {
//NOTE: With this parametrization every function it is expressed analytically. Then, it is possible to choose both to take the derivative of M_pl to obtain alpha_M or to integrate alpha_M to obtain M_pl. Even if the two results are undistinguishable, we choose the latter option, since in Class integrals are more stable numerically.

double alpha_M0 = pba->parameters_2_smg[0];
double beta = pba->parameters_2_smg[1];
double Omega = exp(alpha_M0*pow(a, beta)/beta)-1;

pvecback[pba->index_bg_tensor_excess_smg] = 0;
pvecback[pba->index_bg_mpl_running_smg] = alpha_M0*pow(a, beta);
pvecback[pba->index_bg_braiding_smg] = -pvecback[pba->index_bg_mpl_running_smg];
pvecback[pba->index_bg_kineticity_smg] = (1-beta-pvecback[pba->index_bg_mpl_running_smg])*pvecback[pba->index_bg_mpl_running_smg] + 3*(2+pvecback[pba->index_bg_mpl_running_smg])*(pvecback[pba->index_bg_rho_smg]+pvecback[pba->index_bg_p_smg])/2/rho_tot + 3*(pvecback[pba->index_bg_mpl_running_smg]+2*Omega/(1+Omega))*(pvecback[pba->index_bg_rho_tot_wo_smg]+pvecback[pba->index_bg_p_tot_wo_smg])/2/rho_tot;
pvecback[pba->index_bg_M2_smg] = M_pl;
}


pvecback[pba->index_bg_H] = sqrt(rho_tot-pba->K/a/a);
Expand Down Expand Up @@ -2736,12 +2702,6 @@ int background_gravity_parameters(
pba->parameters_2_smg[0],pba->parameters_2_smg[1],pba->parameters_2_smg[2],pba->parameters_2_smg[3],pba->parameters_2_smg[4],pba->parameters_2_smg[5],pba->parameters_2_smg[6],pba->parameters_2_smg[7]);
break;

case planck_linear:
printf("Modified gravity: planck_linear with parameters: \n");
printf("-> Omega_0 = %g \n",
pba->parameters_2_smg[0]);
break;


}

Expand Down
20 changes: 1 addition & 19 deletions source/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,28 +1068,10 @@ int input_read_parameters(
class_read_list_of_doubles("parameters_smg",pba->parameters_2_smg,pba->parameters_2_size_smg);
}

if (strcmp(string1,"planck_linear") == 0) {
pba->gravity_model_smg = planck_linear;
pba->field_evolution_smg = _FALSE_;
pba->M_pl_evolution_smg = _TRUE_;
flag2=_TRUE_;
pba->parameters_2_size_smg = 1;
class_read_list_of_doubles("parameters_smg",pba->parameters_2_smg,pba->parameters_2_size_smg);
}

if (strcmp(string1,"planck_exponential") == 0) {
pba->gravity_model_smg = planck_exponential;
pba->field_evolution_smg = _FALSE_;
pba->M_pl_evolution_smg = _TRUE_;
flag2=_TRUE_;
pba->parameters_2_size_smg = 2;
class_read_list_of_doubles("parameters_smg",pba->parameters_2_smg,pba->parameters_2_size_smg);
}


class_test(flag2==_FALSE_,
errmsg,
"could not identify gravity_theory value, check that it is one of 'propto_omega', 'propto_scale', 'eft_propto_scale', 'eft_power_law', 'eft_exponential', 'planck_linear', 'planck_exponential' ...");
"could not identify gravity_theory value, check that it is one of 'propto_omega', 'propto_scale', 'eft_propto_scale', 'eft_power_law', 'eft_exponential' ...");

}// end of loop over models

Expand Down

0 comments on commit 0e80e99

Please sign in to comment.