Skip to content

Commit

Permalink
Changed name of {eft_propto_scale, eft_power_law, eft_exponential} in…
Browse files Browse the repository at this point in the history
…to {eft_alphas_power_law, eft_gammas_power_law, eft_gammas_exponential}
  • Loading branch information
Emilio Bellini committed May 19, 2017
1 parent 0e80e99 commit 9cc77fa
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions hi_class.ini
Original file line number Diff line number Diff line change
Expand Up @@ -79,17 +79,17 @@ expansion_smg = 0.5 #this value will be overwritten using the closure equation.
ii) "propto_scale": all the alphas are proportional to the scale factor. Then, you have
to provide a vector containg the factor of proportionality of each alpha and the
initial value of the Planck Mass
iii) "eft_propto_scale": delta_M, alpha_{K, B, T} are proportional to the scale factor to
iii) "eft_alphas_power_law": delta_M, alpha_{K, B, T} are proportional to the scale factor to
some power. Then, you have to provide a vector containg eight parameters, the four
proportionality constants and the four exponents of the scale factor. This generalize
the "propto_scale" parametrization with the remarkable exception that in that case
alpha_M was proportional to the scale factor, while here it is the Planck mass that
scales with the scale factor
iv) "eft_power_law": this parametrization uses the basis of the eft framework
iv) "eft_gammas_power_law": this parametrization uses the basis of the eft framework
(Omega, gamma_i) and assumes that they are power laws of the scale factor
(g1_0*pow(a,g1_exp)). You have to provide a vector containing eight parameters,
the four proportionality constants and the four exponents of the scale factor
v) "eft_exponential": this parametrization uses the basis of the eft framework
v) "eft_gammas_exponential": this parametrization uses the basis of the eft framework
(Omega, gamma_i) and assumes that they are exponentials in the scale factor. In a
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
Expand All @@ -98,9 +98,9 @@ expansion_smg = 0.5 #this value will be overwritten using the closure equation.
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
iii) "eft_alphas_power_law" -> delta_M_0, x_k, x_b, x_t, delta_M_0_exp, x_k_exp, x_b_exp, x_t_exp
iv) "eft_gammas_power_law" -> Om_0, g_1, g_2, g_3, Om_0_exp, g_1_exp, g_2_exp, g_3_exp
v) "eft_gammas_exponential" -> Om_0, g_1, g_2, g_3, Om_0_exp, g_1_exp, g_2_exp, g_3_exp


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}; //write here the different models
enum gravity_model {propto_omega, propto_scale, eft_alphas_power_law, eft_gammas_power_law, eft_gammas_exponential}; //write here the different models

// initial conditions for the perturbations
enum pert_initial_conditions {single_clock, zero};
Expand Down
26 changes: 13 additions & 13 deletions source/background.c
Original file line number Diff line number Diff line change
Expand Up @@ -2195,14 +2195,14 @@ int background_initial_conditions(
pvecback_integration[pba->index_bi_M_pl_smg] = pba->parameters_2_smg[4];
break;

case eft_propto_scale:
case eft_alphas_power_law:
pvecback_integration[pba->index_bi_M_pl_smg] = 1. + pba->parameters_2_smg[0]*pow(a, pba->parameters_2_smg[4]);
break;

case eft_power_law:
case eft_gammas_power_law:
pvecback_integration[pba->index_bi_M_pl_smg] = 1. + pba->parameters_2_smg[0]*pow(a,pba->parameters_2_smg[4]) + pba->parameters_2_smg[3]*pow(a,pba->parameters_2_smg[7]);
break;
case eft_exponential:
case eft_gammas_exponential:
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;

Expand Down Expand Up @@ -2559,7 +2559,7 @@ int background_gravity_functions(
pvecback[pba->index_bg_mpl_running_smg] = c_m*a;
pvecback[pba->index_bg_M2_smg] = M_pl;
}
else if (pba->gravity_model_smg == eft_propto_scale) {
else if (pba->gravity_model_smg == eft_alphas_power_law) {

double M_0 = pba->parameters_2_smg[0];
double c_k = pba->parameters_2_smg[1];
Expand All @@ -2576,7 +2576,7 @@ int background_gravity_functions(
pvecback[pba->index_bg_mpl_running_smg] = M_0*M_0_exp*pow(a, M_0_exp)/(1. + M_0*pow(a, M_0_exp));
pvecback[pba->index_bg_M2_smg] = M_pl;
}
else if ((pba->gravity_model_smg == eft_power_law) || (pba->gravity_model_smg == eft_exponential)) {
else if ((pba->gravity_model_smg == eft_gammas_power_law) || (pba->gravity_model_smg == eft_gammas_exponential)) {

double Omega=0., g1=0., g2=0., g3=0., Omega_p=0., Omega_pp=0., g3_p=0.;
double Omega_0=0., g1_0=0., g2_0=0., g3_0=0.;
Expand All @@ -2591,7 +2591,7 @@ int background_gravity_functions(
g2_exp = pba->parameters_2_smg[6];
g3_exp = pba->parameters_2_smg[7];

if (pba->gravity_model_smg == eft_power_law) {
if (pba->gravity_model_smg == eft_gammas_power_law) {
Omega = Omega_0*pow(a,Omega_exp);
Omega_p = Omega_0*Omega_exp*pow(a,Omega_exp-1.); // Derivative w.r.t. the scale factor
Omega_pp = Omega_0*Omega_exp*(Omega_exp-1.)*pow(a,Omega_exp-2.); // Derivative w.r.t. the scale factor
Expand All @@ -2600,7 +2600,7 @@ int background_gravity_functions(
g3 = g3_0*pow(a,g3_exp);
g3_p = g3_0*g3_exp*pow(a,g3_exp-1.); // Derivative w.r.t. the scale factor
}
else { //(pba->gravity_model_smg == eft_exponential)
else { //(pba->gravity_model_smg == eft_gammas_exponential)
Omega = exp(Omega_0*pow(a,Omega_exp))-1.;
Omega_p = Omega_0*Omega_exp*pow(a,Omega_exp-1.)*exp(Omega_0*pow(a,Omega_exp)); // Derivative w.r.t. the scale factor
Omega_pp = Omega_0*Omega_exp*pow(a,Omega_exp-2.)*exp(Omega_0*pow(a,Omega_exp))*(Omega_exp-1.+Omega_0*Omega_exp*pow(a,Omega_exp)); // Derivative w.r.t. the scale factor
Expand Down Expand Up @@ -2683,21 +2683,21 @@ int background_gravity_parameters(
pba->parameters_2_smg[4]);
break;

case eft_propto_scale:
printf("Modified gravity: eft_propto_scale with parameters: \n");
case eft_alphas_power_law:
printf("Modified gravity: eft_alphas_power_law with parameters: \n");
printf("-> M_*^2_0 = %g, c_K = %g, c_B = %g, c_T = %g, M_*^2_exp = %g, c_K_exp = %g, c_B_exp = %g, c_T_exp = %g\n",
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 eft_power_law:
printf("Modified gravity: eft_power_law with parameters: \n");
case eft_gammas_power_law:
printf("Modified gravity: eft_gammas_power_law with parameters: \n");
printf("-> Omega_0 = %g, gamma_1 = %g, gamma_2 = %g, gamma_3 = %g, Omega_0_exp = %g, gamma_1_exp = %g, gamma_2_exp = %g, gamma_3_exp = %g \n",
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 eft_exponential:
printf("Modified gravity: eft_exponential with parameters: \n");
case eft_gammas_exponential:
printf("Modified gravity: eft_gammas_exponential with parameters: \n");
printf("-> Omega_0 = %g, gamma_1 = %g, gamma_2 = %g, gamma_3 = %g, Omega_0_exp = %g, gamma_1_exp = %g, gamma_2_exp = %g, gamma_3_exp = %g \n",
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;
Expand Down
14 changes: 7 additions & 7 deletions source/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -1041,26 +1041,26 @@ int input_read_parameters(
class_read_list_of_doubles("parameters_smg",pba->parameters_2_smg,pba->parameters_2_size_smg);
}

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

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

if (strcmp(string1,"eft_exponential") == 0) {
pba->gravity_model_smg = eft_exponential;
if (strcmp(string1,"eft_gammas_exponential") == 0) {
pba->gravity_model_smg = eft_gammas_exponential;
pba->field_evolution_smg = _FALSE_;
pba->M_pl_evolution_smg = _TRUE_;
flag2=_TRUE_;
Expand All @@ -1071,7 +1071,7 @@ int input_read_parameters(

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' ...");
"could not identify gravity_theory value, check that it is one of 'propto_omega', 'propto_scale', 'eft_alphas_power_law', 'eft_gammas_power_law', 'eft_gammas_exponential' ...");

}// end of loop over models

Expand Down

0 comments on commit 9cc77fa

Please sign in to comment.