Commit 5dcfeb7f authored by Benjamin Audren's avatar Benjamin Audren
Browse files

Release 2.4.0

* 2.4: (129 commits)
  fixed tests for density cl
  fixed default value of H_n for inflation_H
  fixed density_cl to use spectra and not lensing
  removed tabs
  Finetuning and bugfixing related to new output functionality
  transformed the README to rst syntax
  added tests and pushed version number
  inflation_V_end can now also deal with inflation ending up at imposed value phi_end
  spectrum.c all polished
  polished all primordial.c but find_phi_pivot()
  started to polish source/primordial.c
  polished inflation part in explanatory.ini
  polished inflation-related parameters in common.h and input.c
  polished primordial.h
  inflation_V_end works now. Just needs polishing
  inflation_V_end supposed to be coded, but bugs remain
  started to encode proper time in inflation
  find_pivot2() works
  fixed at least "evolve" with option _end_inflation_
  making progress inflation_V_end
  ...
parents f987fea0 90c38d2b
This diff is collapsed.
......@@ -114,6 +114,8 @@ TEST_BACKGROUND = test_background.o
TEST_SIGMA = test_sigma.o
TEST_HYPERSPHERICAL = test_hyperspherical.o
TEST_STEPHANE = test_stephane.o
C_TOOLS = $(addprefix tools/, $(addsuffix .c,$(basename $(TOOLS))))
......@@ -150,21 +152,25 @@ test_stephane: $(TOOLS) $(SOURCE) $(EXTERNAL) $(OUTPUT) $(TEST_STEPHANE)
test_degeneracy: $(TOOLS) $(SOURCE) $(EXTERNAL) $(OUTPUT) $(TEST_DEGENERACY)
$(CC) $(OPTFLAG) $(OMPFLAG) $(LDFLAG) -o $@ $(addprefix build/,$(notdir $^)) -lm
test_transfer: $(TOOLS) $(INPUT) $(BACKGROUND) $(THERMO) $(PERTURBATIONS) $(PRIMORDIAL) $(NONLINEAR) $(TRANSFER) $(EXTERNAL) $(TEST_TRANSFER)
test_transfer: $(TOOLS) $(SOURCE) $(EXTERNAL) $(TEST_TRANSFER)
$(CC) $(OPTFLAG) $(OMPFLAG) $(LDFLAG) -o $@ $(addprefix build/,$(notdir $^)) -lm
test_nonlinear: $(TOOLS) $(INPUT) $(BACKGROUND) $(THERMO) $(PERTURBATIONS) $(PRIMORDIAL) $(NONLINEAR) $(EXTERNAL) $(TEST_NONLINEAR)
test_nonlinear: $(TOOLS) $(SOURCE) $(EXTERNAL) $(TEST_NONLINEAR)
$(CC) $(OPTFLAG) $(OMPFLAG) $(LDFLAG) -o $@ $(addprefix build/,$(notdir $^)) -lm
test_perturbations: $(TOOLS) $(INPUT) $(BACKGROUND) $(THERMO) $(PERTURBATIONS) $(EXTERNAL) $(TEST_PERTURBATIONS)
test_perturbations: $(TOOLS) $(SOURCE) $(EXTERNAL) $(TEST_PERTURBATIONS)
$(CC) $(OPTFLAG) $(OMPFLAG) $(LDFLAG) -o $@ $(addprefix build/,$(notdir $^)) -lm
test_thermodynamics: $(TOOLS) $(INPUT) $(BACKGROUND) $(THERMO) $(EXTERNAL) $(TEST_THERMODYNAMICS)
test_thermodynamics: $(TOOLS) $(SOURCE) $(EXTERNAL) $(TEST_THERMODYNAMICS)
$(CC) $(OPTFLAG) $(OMPFLAG) $(LDFLAG) -o $@ $(addprefix build/,$(notdir $^)) -lm
test_background: $(TOOLS) $(INPUT) $(BACKGROUND) $(TEST_BACKGROUND)
test_background: $(TOOLS) $(SOURCE) $(EXTERNAL) $(TEST_BACKGROUND)
$(CC) $(OPTFLAG) $(OMPFLAG) $(LDFLAG) -o $@ $(addprefix build/,$(notdir $^)) -lm
test_hyperspherical: $(TOOLS) $(TEST_HYPERSPHERICAL)
$(CC) $(OPTFLAG) $(OMPFLAG) $(LDFLAG) -o test_hyperspherical $(addprefix build/,$(notdir $^)) -lm
tar: $(C_ALL) $(C_TEST) $(H_ALL) $(PRE_ALL) $(INI_ALL) $(MISC_FILES) $(HYREC) $(PYTHON_FILES)
tar czvf class.tar.gz $(C_ALL) $(H_ALL) $(PRE_ALL) $(INI_ALL) $(MISC_FILES) $(HYREC) $(PYTHON_FILES)
......
Readme file for CLASS - the Cosmic Linear Anisotropy Solving System
==============================================
CLASS: Cosmic Linear Anisotropy Solving System
==============================================
By Julien Lesgourgues, with several major inputs from other people,
especially Thomas Tram, as well as Benjamin Audren, Simon Prunet, etc.
:Author: Julien Lesgourgues
with several major inputs from other people, especially Thomas Tram,
as well as Benjamin Audren, Simon Prunet, etc.
For download and information, see http://class-code.net
------------------------------------------------------------------
COMPILING CLASS AND GETTING STARTED
Compiling CLASS and getting started
-----------------------------------
(the information below can also be found on the webpage, just below
the download button)
......@@ -26,7 +30,7 @@ an advancesd step that you probably don't need).
Adapt your input parameters in the file explanatory.ini and run with:
./class explanatory.ini
./class explanatory.ini
Or, even better, make a copy of explanatory.ini into another file, for
instance test.ini, and remove everything in test.ini that you judge
......@@ -34,24 +38,24 @@ useless for your own purpose: in that way you can keep explanatory.ini
as a reference file, and play with a more concise and friendly input
file. You can then run with
./class test.ini.
./class test.ini.
If you want to play with the precision/speed of the code, you can use
one of the provided precision files (e.g. cl_permille.pre) or modify
one of them, and run with two input files, for instance:
./class test.ini cl_permille.pre
./class test.ini cl_permille.pre
A simplified documentation can be found in the paper ``CLASS I:
Overview'', arXiv:1104.2932 [astro-ph.IM]. On top of that, if you wish
to modify the code, you will find lots of comments directly into the
files (and the amount of such comments will increase with the version
number). A more complete documentation may become available some day
if enough users ask for it...
A simplified documentation can be found in the paper
`CLASS I: Overview <http://arxiv.org/abs/1104.2932>`_. On top of that,
if you wish to modify the code, you will find lots of comments
directly into the files (and the amount of such comments will increase
with the version number). A more complete documentation may become
available some day if enough users ask for it...
---------------------------------------------------------------------
PLOTTING UTILITY
Plotting utility
----------------
Since version 1.2, the package includes a convenient plotting script
called CPU (Class Plotting Utility), written by Benjamin Audren. It
......@@ -75,17 +79,17 @@ anything, if scipy and gnuplot are installed on your computer, the
CPU command will work immediately.
You can plot a spectrum produced by CLASS (or by another code) and
stored e.g. in the file output/xxx.dat with:
stored e.g. in the file `output/xxx.dat` with:
> python CPU output/xxx.dat
python CPU output/xxx.dat
or two different spectra with:
> python CPU output/xxx.dat output/yyy.dat
python CPU output/xxx.dat output/yyy.dat
You can get a list of all available options by typing
> python CPU --help
python CPU --help
These options allow you to choose between linear and log scale, to
plot ratios or relative differences between two files, to send the
......
This diff is collapsed.
......@@ -65,6 +65,19 @@ struct background
double Gamma_dcdm; /**< \f$ \Gamma_{dcdm} \f$ : decay constant for decaying cold dark matter */
double Omega0_scf; /**< \f$ \Omega_{0 scf} \f$ : scalar field */
short attractor_ic_scf; /** < whether the scalar field has attractor initial conditions */
double phi_ini_scf; /**< \f$ \phi(t_0) \f$ : scalar field initial value */
double phi_prime_ini_scf; /**< \f$ d\phi(t_0)/d\tau \f$ : scalar field initial derivative wrt conformal time */
double * scf_parameters; /**< list of parameters describing the scalar field potential */
int scf_parameters_size; /**< size of scf_parameters */
int scf_tuning_index; /**< index in scf_parameters used for tuning */
//double scf_lambda; /**< \f$ \lambda \f$ : scalar field exponential potential slope */
//double scf_alpha; /**< \f$ \alpha \f$ : Albrecht-Skordis polynomial slope */
//double scf_B; /**< \f$ \alpha \f$ : Albrecht-Skordis field shift */
//double scf_A; /**< \f$ \alpha \f$ : Albrecht-Skordis offset */
double Omega0_k; /**< \f$ \Omega_{0_k} \f$ : curvature contribution */
int N_ncdm; /**< Number of distinguishabe ncdm species */
......@@ -148,6 +161,14 @@ struct background
int index_bg_rho_dcdm; /**< dcdm density */
int index_bg_rho_dr; /**< dr density */
int index_bg_phi_scf; /**< scalar field value */
int index_bg_phi_prime_scf; /**< scalar field derivative wrt conformal time */
int index_bg_V_scf; /**< scalar field potential V */
int index_bg_dV_scf; /**< scalar field potential derivative V' */
int index_bg_ddV_scf; /**< scalar field potential second derivative V'' */
int index_bg_rho_scf; /**< scalar field energy density */
int index_bg_p_scf; /**< scalar field pressure */
int index_bg_rho_ncdm1; /**< density of first ncdm species (others contiguous) */
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 */
......@@ -193,6 +214,7 @@ struct background
//@}
/** @name - all indices for the vector of background quantities to be integrated (=bi)
*
* Most background quantities can be immediately inferred from the
......@@ -209,6 +231,8 @@ struct background
int index_bi_a; /**< {B} scale factor */
int index_bi_rho_dcdm;/**< {B} dcdm density */
int index_bi_rho_dr; /**< {B} dr density */
int index_bi_phi_scf; /**< {B} scalar field value */
int index_bi_phi_prime_scf; /**< {B} scalar field derivative wrt conformal time */
int index_bi_time; /**< {C} proper (cosmological) time in Mpc */
int index_bi_rs; /**< {C} sound horizon */
......@@ -233,6 +257,7 @@ struct background
short has_cdm; /**< presence of cold dark matter? */
short has_dcdm; /**< presence of decaying cold dark matter? */
short has_dr; /**< presence of relativistic decay radiation? */
short has_scf; /**< presence of a scalar field? */
short has_ncdm; /**< presence of non-cold dark matter? */
short has_lambda; /**< presence of cosmological constant? */
short has_fld; /**< presence of fluid with constant w and cs2? */
......@@ -248,7 +273,6 @@ struct background
//@{
int keep_ncdm_stuff; /* Do not free ncdm arrays with background_free() */
double ** q_ncdm_bg; /* Pointers to vectors of background sampling in q */
double ** w_ncdm_bg; /* Pointers to vectors of corresponding quadrature weights w */
double ** q_ncdm; /* Pointers to vectors of perturbation sampling in q */
......@@ -363,6 +387,10 @@ extern "C" {
struct background *pba
);
int background_free_input(
struct background *pba
);
int background_indices(
struct background *pba
);
......@@ -417,6 +445,15 @@ extern "C" {
double * pvecback_integration
);
int background_output_titles(struct background * pba,
char titles[_MAXTITLESTRINGLENGTH_]
);
int background_output_data(
struct background *pba,
int number_of_titles,
double *data);
int background_derivs(
double z,
double * y,
......@@ -425,6 +462,29 @@ extern "C" {
ErrorMsg error_message
);
/** Scalar field potential and its derivatives **/
double V_scf(
struct background *pba,
double phi
);
double dV_scf(
struct background *pba,
double phi
);
double ddV_scf(
struct background *pba,
double phi
);
/** Coupling between scalar field and matter **/
double Q_scf(
struct background *pba,
double phi,
double phi_prime
);
#ifdef __cplusplus
}
#endif
......
......@@ -15,7 +15,7 @@
#ifndef __COMMON__
#define __COMMON__
#define _VERSION_ "v2.3.2"
#define _VERSION_ "v2.4.0"
#define _TRUE_ 1 /**< integer associated to true statement */
#define _FALSE_ 0 /**< integer associated to false statement */
......@@ -55,6 +55,12 @@ typedef char FileName[_FILENAMESIZE_];
#define _COLUMNWIDTH_ 24 /**< Must be at least _OUTPUTPRECISION_+8 for guaranteed fixed width columns */
#define _MAXTITLESTRINGLENGTH_ 8000 /**< Maximum number of characters in title strings */
#define _DELIMITER_ "\t" /**< character used for delimiting titles in the title strings */
#ifndef __CLASSDIR__
#define __CLASSDIR__ "." /**< The directory of CLASS. This is set to the absolute path to the CLASS directory so this is just a failsafe. */
#endif
......@@ -71,6 +77,7 @@ void class_protect_sprintf(char* dest, char* tpl,...);
void class_protect_fprintf(FILE* dest, char* tpl,...);
void* class_protect_memcpy(void* dest, void* from, size_t sz);
int get_number_of_titles(char * titlestring);
#define class_build_error_string(dest,tmpl,...) { \
ErrorMsg FMsg; \
......@@ -235,6 +242,16 @@ void* class_protect_memcpy(void* dest, void* from, size_t sz);
fprintf(file,"%*.*e ",_COLUMNWIDTH_,_OUTPUTPRECISION_,output); \
}
#define class_fprintf_double_or_default(file, \
output, \
condition, \
defaultvalue){ \
if (condition == _TRUE_) \
fprintf(file,"%*.*e ",_COLUMNWIDTH_,_OUTPUTPRECISION_,output); \
else \
fprintf(file,"%*.*e ",_COLUMNWIDTH_,_OUTPUTPRECISION_,defaultvalue); \
}
#define class_fprintf_int(file, \
output, \
condition){ \
......@@ -254,6 +271,35 @@ void* class_protect_memcpy(void* dest, void* from, size_t sz);
"",colnum++,_OUTPUTPRECISION_+6,title); \
}
#define class_store_columntitle(titlestring, \
title, \
condition){ \
if (condition == _TRUE_){ \
strcat(titlestring,title); \
strcat(titlestring,_DELIMITER_); \
} \
}
//,_MAXTITLESTRINGLENGTH_-strlen(titlestring)-1);
#define class_store_double(storage, \
value, \
condition, \
dataindex){ \
if (condition == _TRUE_) \
storage[dataindex++] = value; \
}
#define class_store_double_or_default(storage, \
value, \
condition, \
dataindex, \
defaultvalue){ \
if (condition == _TRUE_) \
storage[dataindex++] = value; \
else \
storage[dataindex++] = defaultvalue; \
}
/** parameters related to the precision of the code and to the method of calculation */
/**
......@@ -276,6 +322,11 @@ enum pk_def {
delta_bc_squared, /**< delta_bc includes contribution of baryons and cdm only to (delta rho) and to rho */
delta_tot_from_poisson_squared /**< use delta_tot inferred from gravitational potential through Poisson equation */
};
/**
* Different ways to present output files
*/
enum file_format {class_format,camb_format};
/**
* All precision parameters.
......@@ -339,6 +390,11 @@ struct precision
*/
double tol_ncdm_initial_w;
/**
* parameter controling the initial scalar field in background functions
*/
double safe_phi_scf;
//@}
/** @name - parameters related to the thermodynamics */
......@@ -560,6 +616,12 @@ struct precision
int primordial_inflation_attractor_maxit;
double primordial_inflation_jump_initial;
double primordial_inflation_tol_curvature;
double primordial_inflation_aH_ini_target;
double primordial_inflation_end_dphi;
double primordial_inflation_end_logstep;
double primordial_inflation_small_epsilon;
double primordial_inflation_small_epsilon_tol;
double primordial_inflation_extra_efolds;
//@}
......
......@@ -134,10 +134,10 @@
* temporary parameters for background fzero function
*/
enum target_names {theta_s, Omega_dcdmdr, omega_dcdmdr};
enum target_names {theta_s, Omega_dcdmdr, omega_dcdmdr, Omega_scf, Omega_ini_dcdm, omega_ini_dcdm};
enum computation_stage {cs_background, cs_thermodynamics, cs_perturbations,
cs_primordial, cs_nonlinear, cs_transfer, cs_spectra};
#define _NUM_TARGETS_ 3 //Keep this number as number of target_names
#define _NUM_TARGETS_ 6 //Keep this number as number of target_names
struct input_pprpba {
struct precision * ppr;
......@@ -261,7 +261,12 @@ extern "C" {
int file_exists(const char *fname);
int input_auxillary_target_conditions(enum target_names target_name, double target_value);
int input_auxillary_target_conditions(struct file_content * pfc,
enum target_names target_name,
double target_value,
int * aux_flag,
ErrorMsg error_message);
#ifdef __cplusplus
}
#endif
......
......@@ -3,6 +3,7 @@
#ifndef __OUTPUT__
#define __OUTPUT__
#include "common.h"
#include "lensing.h"
/**
......@@ -12,12 +13,6 @@
#define _Z_PK_NUM_MAX_ 100
/**
* Different ways to present output files
*/
enum file_format {class_format,camb_format};
/**
* Structure containing various informations on the output format,
* all of them initialized by user in input module.
......@@ -38,7 +33,7 @@ struct output {
//@{
double z_pk_num;
int z_pk_num;
double z_pk[_Z_PK_NUM_MAX_];
//@}
......@@ -53,6 +48,7 @@ struct output {
short write_background;
short write_thermodynamics;
short write_perturbations;
short write_primordial;
//@}
......@@ -137,12 +133,22 @@ extern "C" {
struct output * pop
);
int output_perturbations(
struct background * pba,
struct perturbs * ppt,
struct output * pop
);
int output_primordial(
struct perturbs * ppt,
struct primordial * ppm,
struct output * pop
);
int output_print_data(FILE *out,
char titles[_MAXTITLESTRINGLENGTH_],
double *dataptr,
int tau_size);
int output_open_cl_file(
struct spectra * psp,
struct output * pop,
......@@ -189,66 +195,6 @@ extern "C" {
int k_size
);
int output_open_tk_file(
struct background * pba,
struct perturbs * ppt,
struct spectra * psp,
struct output * pop,
FILE ** tkfile,
FileName filename,
char * first_line,
double z
);
int output_one_line_of_tk(
FILE * tkfile,
double one_k,
double * tk,
int tr_size
);
int output_open_background_file(
struct background * pba,
struct output * pop,
FILE ** backfile,
FileName filename
);
int output_one_line_of_background(
struct background * pba,
FILE * backfile,
double * pvecback
);
int output_open_thermodynamics_file(
struct thermo * pth,
struct output * pop,
FILE ** thermofile,
FileName filename
);
int output_one_line_of_thermodynamics(
struct thermo * pth,
FILE * thermofile,
double tau,
double z,
double * pvecthermo
);
int output_open_primordial_file(
struct perturbs * ppt,
struct primordial * ppm,
struct output * pop,
FILE * * outputfile,
FileName filename
);
int output_one_line_of_primordial(
struct perturbs * ppt,
struct primordial * ppm,
FILE * outputfile,
int index_k
);
#ifdef __cplusplus
}
......
......@@ -159,12 +159,25 @@ struct perturbs
int switch_pol; /**< in temperature calculation, do we want to include the polarisation-related term? */
double eisw_lisw_split_z; /**< at which redshift do we define the cut between eisw and lisw ?*/
int store_perturbations; /**< Do we want to store perturbations? */
int k_output_values_num; /**< Number of perturbation outputs (default=0) */
double k_output_values[_MAX_NUMBER_OF_K_FILES_]; /**< List of k values where perturbation output is requested. */
int index_k_output_values[_MAX_NUMBER_OF_K_FILES_]; /**< List of indices corresponding to k-values close to k_output_values */
FileName root; /**< Same as root in output structure, for writing perturbations.*/
char scalar_titles[_MAXTITLESTRINGLENGTH_]; /**< _DELIMITER_ separated string of titles for scalar perturbation output files. */
char vector_titles[_MAXTITLESTRINGLENGTH_]; /**< _DELIMITER_ separated string of titles for vector perturbation output files. */
char tensor_titles[_MAXTITLESTRINGLENGTH_]; /**< _DELIMITER_ separated string of titles for tensor perturbation output files. */
int number_of_scalar_titles;
int number_of_vector_titles;
int number_of_tensor_titles;
double * scalar_perturbations_data[_MAX_NUMBER_OF_K_FILES_]; /**< Array of double pointers to perturbation output for scalars */
double * vector_perturbations_data[_MAX_NUMBER_OF_K_FILES_]; /**< Array of double pointers to perturbation output for vectors */
double * tensor_perturbations_data[_MAX_NUMBER_OF_K_FILES_]; /**< Array of double pointers to perturbation output for tensors */
int size_scalar_perturbation_data[_MAX_NUMBER_OF_K_FILES_]; /**< Array of sizes of scalar double pointers */
int size_vector_perturbation_data[_MAX_NUMBER_OF_K_FILES_]; /**< Array of sizes of vector double pointers */
int size_tensor_perturbation_data[_MAX_NUMBER_OF_K_FILES_]; /**< Array of sizes of tensor double pointers */
//@}
/** @name - useful flags infered from the ones above */
......@@ -223,6 +236,7 @@ struct perturbs
short has_source_delta_cdm; /**< do we need source for delta of cold dark matter? */
short has_source_delta_dcdm; /**< do we need source for delta of DCDM? */
short has_source_delta_fld; /**< do we need source for delta of dark energy? */
short has_source_delta_scf; /**< do we need source for delta from scalar field? */
short has_source_delta_dr; /**< do we need source for delta of decay radiation? */
short has_source_delta_ur; /**< do we need source for delta of ultra-relativistic neutrinos/relics? */
short has_source_delta_ncdm; /**< do we need source for delta of all non-cold dark matter species (e.g. massive neutrinos)? */
......@@ -232,6 +246,7 @@ struct perturbs
short has_source_theta_cdm; /**< do we need source for theta of cold dark matter? */
short has_source_theta_dcdm; /**< do we need source for theta of DCDM? */
short has_source_theta_fld; /**< do we need source for theta of dark energy? */
short has_source_theta_scf; /**< do we need source for theta of scalar field? */
short has_source_theta_dr; /**< do we need source for theta of ultra-relativistic neutrinos/relics? */
short has_source_theta_ur; /**< do we need source for theta of ultra-relativistic neutrinos/relics? */
short has_source_theta_ncdm; /**< do we need source for theta of all non-cold dark matter species (e.g. massive neutrinos)? */
......@@ -254,6 +269,7 @@ struct perturbs
int index_tp_delta_cdm; /**< index value for delta of cold dark matter */
int index_tp_delta_dcdm;/**< index value for delta of DCDM */
int index_tp_delta_fld; /**< index value for delta of dark energy */
int index_tp_delta_scf; /**< index value for delta of scalar field */
int index_tp_delta_dr; /**< index value for delta of decay radiation */
int index_tp_delta_ur; /**< index value for delta of ultra-relativistic neutrinos/relics */
int index_tp_delta_ncdm1; /**< index value for delta of first non-cold dark matter species (e.g. massive neutrinos) */
......@@ -266,6 +282,7 @@ struct perturbs
int index_tp_theta_cdm; /**< index value for theta of cold dark matter */
int index_tp_theta_dcdm;/**< index value for theta of DCDM */
int index_tp_theta_fld; /**< index value for theta of dark energy */
int index_tp_theta_scf; /**< index value for theta of scalar field */
int index_tp_theta_ur; /**< index value for theta of ultra-relativistic neutrinos/relics */
int index_tp_theta_dr; /**< index value for F1 of decay radiation */
int index_tp_theta_ncdm1; /**< index value for theta of first non-cold dark matter species (e.g. massive neutrinos) */
......@@ -374,6 +391,8 @@ struct perturb_vector
int index_pt_theta_dcdm; /**< dcdm velocity */
int index_pt_delta_fld; /**< dark energy density */
int index_pt_theta_fld; /**< dark energy velocity */
int index_pt_phi_scf; /**< scalar field density */
int index_pt_phi_prime_scf; /**< scalar field velocity */
int index_pt_delta_ur; /**< density of ultra-relativistic neutrinos/relics */
int index_pt_theta_ur; /**< velocity of ultra-relativistic neutrinos/relics */
int index_pt_shear_ur; /**< shear of ultra-relativistic neutrinos/relics */
......@@ -479,6 +498,7 @@ struct perturb_workspace
double theta_m;
FILE * perturb_output_file; /**< filepointer to output file*/
int index_ikout; /**< index for output k value */
//@}
......@@ -762,6 +782,9 @@ extern "C" {
int index_ikout,
int index_md);
int perturb_prepare_output(struct background * pba,
struct perturbs * ppt);
#ifdef __cplusplus
}
#endif
......
......@@ -12,6 +12,7 @@ enum primordial_spectrum_type {
two_scales,
inflation_V,
inflation_H,
inflation_V_end,
external_Pk
};
......@@ -29,6 +30,28 @@ enum potential_shape {
natural
};
/** enum defining which quantity plays the role of a target for evolving inflationary equations */
enum target_quantity {
_aH_,
_phi_,
_end_inflation_
};
/** enum specifying if we want to integrate equations forward or backward in time */
enum integration_direction {
backward,
forward
};
/** enum specifying if we want to evolve quantities with conformal or proper time */
enum time_definition {
conformal,
proper
};
/**
* Structure containing everything about primordial spectra that other modules need to know.
*
......@@ -119,13 +142,25 @@ struct primordial {
enum potential_shape potential;
double phi_pivot;