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
9 changes: 9 additions & 0 deletions include/primordial.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@ enum inflation_module_behavior {
analytical
};

/** enum specifying potential derivative dV/dphi sign */

enum potential_derivative_sign {
positive,
negative
};
/**
* Structure containing everything about primordial spectra that other modules need to know.
*
Expand Down Expand Up @@ -181,6 +187,9 @@ struct primordial {
enum phi_pivot_methods phi_pivot_method; /**< flag for method used to define and find the pivot scale */
double phi_pivot_target; /**< For each of the above methods, critical value to be reached between pivot and end of inflation (N_star, [aH]ratio, etc.) */

/* parameter describing potential derivative dV/dphi sign */
enum potential_derivative_sign potential_derivative;

/* behavior of the inflation module */
enum inflation_module_behavior behavior; /**< Specifies if the inflation module computes the primordial spectrum numerically (default) or analytically*/

Expand Down
36 changes: 36 additions & 0 deletions source/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -4195,6 +4195,24 @@ int input_read_parameters_primordial(struct file_content * pfc,

else if ((ppm->primordial_spec_type == inflation_V) || (ppm->primordial_spec_type == inflation_H)) {


/* Sign of derivative of potential, dV/dphi */
class_call(parser_read_string(pfc,"potential_derivative",&string1,&flag1,errmsg),
errmsg,
errmsg);
/* Complete set of parameters */
if (flag1 == _TRUE_) {
if (strcmp(string1,"positive") == 0){
ppm->potential_derivative = positive;
}
else if (strcmp(string1,"negative") == 0){
ppm->potential_derivative = negative;
}
else{
class_stop(errmsg,"You specified 'potential_derivative' as '%s'. It has to be one of {'positive','negative'}.",string1);
}
}

/** 1.c) For type 'inflation_V' */
if (ppm->primordial_spec_type == inflation_V) {

Expand Down Expand Up @@ -4344,6 +4362,22 @@ int input_read_parameters_primordial(struct file_content * pfc,
class_stop(errmsg,"You specified 'full_potential' as '%s'. It has to be one of {'polynomial','higgs_inflation'}.",string1);
}
}
/* Sign of derivative of potential, dV/dphi */
class_call(parser_read_string(pfc,"potential_derivative",&string1,&flag1,errmsg),
errmsg,
errmsg);
/* Complete set of parameters */
if (flag1 == _TRUE_) {
if (strcmp(string1,"positive") == 0){
ppm->potential_derivative = positive;
}
else if (strcmp(string1,"negative") == 0){
ppm->potential = negative;
}
else{
class_stop(errmsg,"You specified 'potential_derivative' as '%s'. It has to be one of {'positive','negative'}.",string1);
}
}

/** 1.e.3) Parameters of the potential */
/* Read */
Expand Down Expand Up @@ -5940,6 +5974,8 @@ int input_default_params(struct background *pba,
ppm->phi_end=0.;
/** 1.e.2) Shape of the potential */
ppm->potential=polynomial;
/* Sign of derivative of potential, dV/dphi */
ppm->potential_derivative=negative;
/** 1.e.4) Increase of scale factor or (aH) between Hubble crossing at pivot
scale and end of inflation */
ppm->phi_pivot_method = N_star;
Expand Down
Loading