From 9cc77faf471d4dd3e02033de5f975fb34e915eb5 Mon Sep 17 00:00:00 2001 From: Emilio Bellini Date: Fri, 19 May 2017 17:19:23 +0100 Subject: [PATCH] Changed name of {eft_propto_scale, eft_power_law, eft_exponential} into {eft_alphas_power_law, eft_gammas_power_law, eft_gammas_exponential} --- hi_class.ini | 12 ++++++------ include/background.h | 2 +- source/background.c | 26 +++++++++++++------------- source/input.c | 14 +++++++------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/hi_class.ini b/hi_class.ini index a1f10025..41b00aa6 100644 --- a/hi_class.ini +++ b/hi_class.ini @@ -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 @@ -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 diff --git a/include/background.h b/include/background.h index d15dc441..7c9f33a2 100755 --- a/include/background.h +++ b/include/background.h @@ -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}; diff --git a/source/background.c b/source/background.c index 05202a98..7c5808bd 100755 --- a/source/background.c +++ b/source/background.c @@ -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; @@ -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]; @@ -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.; @@ -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 @@ -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 @@ -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; diff --git a/source/input.c b/source/input.c index 59fea816..935bf5c7 100755 --- a/source/input.c +++ b/source/input.c @@ -1041,8 +1041,8 @@ 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_; @@ -1050,8 +1050,8 @@ int input_read_parameters( 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_; @@ -1059,8 +1059,8 @@ int input_read_parameters( 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_; @@ -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