Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions explanatory.ini
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,25 @@ be as expected in some models.)

scf_tuning_index = 0

9) scale factor today 'a_today' (arbitrary and irrelevant for most purposes)
9) Nonlocal gravity (see 1602.03558 and ref. therein, in particular app.A for the
eqs used in the code)

Select model (LCDM: 0. (default), R/Box^{-2}R: 1. ,(g_munu R)^T: 2.)

model = 0.

Nonlocal modifications have been implemented in newtonian gauge only, on flat universes (K=0)
Mixing with extra DE components (:other than a cosmological constant) has not been treated.
(the latter are automatically set to zero whenever nonlocal modif are included).
When model!=0. the energy density budget is managed as follows:
a) Omega_Lambda and Omega_nlde unspecified: filled with Omega_nlde
b) Omega_Lambda and Omega_nlde specified: filled with Omega_cdm (useful for model comparison)
c) Omega_Lambda specified and Omega_nlde unspecified: filled with Omega_nlde

#Omega_nlde = 0.0


10) scale factor today 'a_today' (arbitrary and irrelevant for most purposes)
(default: set to 1)

# a_today = 1.
Expand Down Expand Up @@ -206,8 +224,8 @@ reio_parametrization = reio_camb
'helium_fullreio_redshift', 'helium_fullreio_width'
(default: set to 1.5, 0.5, 3.5, 0.5)

z_reio = 11.357
#tau_reio = 0.0925
#z_reio = 11.357
tau_reio = 0.0925

reionization_exponent = 1.5
reionization_width = 0.5
Expand Down Expand Up @@ -288,7 +306,7 @@ they would slow down the code considerably.
Can be left blank if you do not want to evolve cosmological perturbations at
all. (default: set to blanck, no perturbation calculation)

output = tCl,pCl,lCl
output = tCl,pCl,lCl, mPk
#output = tCl,pCl,lCl,mPk
#output = mPk,mTk

Expand Down Expand Up @@ -371,7 +389,7 @@ ic = ad
Newtonian/longitudinal gauge
(default: set to synchronous)

gauge = synchronous
gauge = new

---------------------------------------------
----> define primordial perturbation spectra:
Expand Down
55 changes: 49 additions & 6 deletions include/background.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ struct background
double Omega0_cdm; /**< \f$ \Omega_{0 cdm} \f$ : cold dark matter */

double Omega0_lambda; /**< \f$ \Omega_{0_\Lambda} \f$ : cosmological constant */

//**NonLocal: */
double model;/**0=LCDM, 1=R Box^-2 R, 2=(g_munu R)^T*/
double gnl;/**gamma*/
double Omega0_nlde; /**Nonlocal dark energy density fraction*/
//**NonLocal: definition of background initial condition for auxiliary fields*/
double U_ini_nlde;
double U_prime_ini_nlde;
double V_ini_nlde;
double V_prime_ini_nlde;

double Omega0_fld; /**< \f$ \Omega_{0 de} \f$ : fluid with constant
\f$ w \f$ and \f$ c_s^2 \f$ */
Expand Down Expand Up @@ -146,6 +156,7 @@ struct background

//@{

int index_bg_test;
int index_bg_a; /**< scale factor */
int index_bg_H; /**< Hubble parameter in Mpc^{-1} */
int index_bg_H_prime; /**< its derivative w.r.t. conformal time */
Expand All @@ -160,6 +171,14 @@ struct background
int index_bg_rho_ur; /**< relativistic neutrinos/relics density */
int index_bg_rho_dcdm; /**< dcdm density */
int index_bg_rho_dr; /**< dr density */

/**NonLocal: auxiliary fields and related energy density and pressure*/
int index_bg_U_nlde;
int index_bg_U_prime_nlde;
int index_bg_V_nlde;
int index_bg_V_prime_nlde;
int index_bg_rho_nlde;
int index_bg_p_nlde;

int index_bg_phi_scf; /**< scalar field value */
int index_bg_phi_prime_scf; /**< scalar field derivative wrt conformal time */
Expand All @@ -173,6 +192,9 @@ struct background
int index_bg_p_ncdm1; /**< pressure of first ncdm species (others contiguous) */
int index_bg_pseudo_p_ncdm1;/**< another statistical momentum useful in ncdma approximation */

/**NonLocal: in the nonlocal models, one may need to know the derivative of psi, and in order to do this one needs is to compute the derivative of rho+p for the NCDM component*/
int index_bg_rppdot_ncdm1;

int index_bg_Omega_r; /**< relativistic density fraction (\f$ \Omega_{\gamma} + \Omega_{\nu r} \f$) */

/* end of vector in normal format, now quantitites in long format */
Expand Down Expand Up @@ -228,9 +250,17 @@ struct background

//@{

int index_bi_test;
int index_bi_a; /**< {B} scale factor */
int index_bi_rho_dcdm;/**< {B} dcdm density */
int index_bi_rho_dr; /**< {B} dr density */

/**NonLocal*/
int index_bi_U_nlde;
int index_bi_U_prime_nlde;
int index_bi_V_nlde;
int index_bi_V_prime_nlde;

int index_bi_phi_scf; /**< {B} scalar field value */
int index_bi_phi_prime_scf; /**< {B} scalar field derivative wrt conformal time */

Expand Down Expand Up @@ -264,6 +294,9 @@ struct background
short has_ur; /**< presence of ultra-relativistic neutrinos/relics? */
short has_curvature; /**< presence of global spatial curvature? */

/**NonLocal: presence of nonlocal model*/
short has_nlde;

//@}

/**
Expand Down Expand Up @@ -302,9 +335,10 @@ struct background
/** @name - technical parameters */

//@{



short shooting_failed; /**< flag is set to true if shooting failed. */

ErrorMsg shooting_error; /**< Error message from shooting failed. */

short background_verbose; /**< flag regulating the amount of information sent to standard output (none if set to zero) */
Expand Down Expand Up @@ -417,6 +451,7 @@ extern "C" {
);


/**NonLocal:this function has been modified in order to allow computation of the derivative of rho+p for NCDM*/
int background_ncdm_momenta(
double * qvec,
double * wvec,
Expand All @@ -425,10 +460,12 @@ extern "C" {
double factor,
double z,
double * n,
double * rho,
double * rho,
double * p,
double * drho_dM,
double * pseudo_p
/**NonLocal:*/ double * rppdot,
/**NonLocal:*/ double H,
double * pseudo_p
);

int background_ncdm_M_from_Omega(
Expand Down Expand Up @@ -525,14 +562,16 @@ extern "C" {

//@{

#define _H0_BIG_ 1./2997.9 /**< maximal \f$ H_0 \f$ in \f$ Mpc^{-1} (h=1.0) \f$ */
#define _H0_SMALL_ 0.3/2997.9 /**< minimal \f$ H_0 \f$ in \f$ Mpc^{-1} (h=0.3) \f$ */
#define _H0_BIG_ 10./2997.9 /**< maximal \f$ H_0 \f$ in \f$ Mpc^{-1} (h=1.0) \f$ */
#define _H0_SMALL_ 0.001/2997.9 /**< minimal \f$ H_0 \f$ in \f$ Mpc^{-1} (h=0.3) \f$ */
#define _TCMB_BIG_ 2.8 /**< maximal \f$ T_{cmb} \f$ in K */
#define _TCMB_SMALL_ 2.7 /**< minimal \f$ T_{cmb} \f$ in K */
#define _TOLERANCE_ON_CURVATURE_ 1.e-5 /**< if \f$ | \Omega_k | \f$ smaller than this, considered as flat */
#define _OMEGAK_BIG_ 0.5 /**< maximal \f$ Omega_k \f$ */
#define _OMEGAK_SMALL_ -0.5 /**< minimal \f$ Omega_k \f$ */

/**NonLocal: higher bound for recursive method to find the correct value of gamma (executed in background.c)*/
#define _GNL_HI_ 0.2 /**< maximal acceptable \f$ gnl \f$ */
//@}

/**
Expand All @@ -545,6 +584,10 @@ extern "C" {
for an initial scale factor at which ncdm
are still relativistic */

/**NonLocal: parameters in the recursive algorithm to find the correct value of gamma*/
#define _TOLH_ 0.00000001 /** tolerance on final H_0*/
#define _MAXS_ 1000 /** max steps in bisection procedure to find */

#define _PSD_DERIVATIVE_EXP_MIN_ -30 /**< for ncdm, for accurate computation of dlnf0/dlnq, q step is varied in range specified by these parameters */
#define _PSD_DERIVATIVE_EXP_MAX_ 2 /**< for ncdm, for accurate computation of dlnf0/dlnq, q step is varied in range specified by these parameters */

Expand Down
8 changes: 8 additions & 0 deletions include/perturbations.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,14 @@ struct perturb_vector
int index_pt_theta_cdm; /**< cdm velocity */
int index_pt_delta_dcdm; /**< dcdm density */
int index_pt_theta_dcdm; /**< dcdm velocity */
/**NonLocal: perturbations of auxiliary fields*/
int index_pt_deltaU_nlde;
int index_pt_deltaU_prime_nlde;
int index_pt_deltaV_nlde;
int index_pt_deltaV_prime_nlde;
int index_pt_deltaZ_nlde; /*needed only for the model 1.*/
int index_pt_deltaZ_prime_nlde; /*needed only for model 1.*/

int index_pt_delta_fld; /**< dark energy density */
int index_pt_theta_fld; /**< dark energy velocity */
int index_pt_phi_scf; /**< scalar field density */
Expand Down
Loading