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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,9 @@ ___

One can add in new models by going to the source code, `reactions/src/BeyondLCDM.cpp` and adding in a new `case n:` in the relevant functions. The array extpars stores the theory parameters. The default size of this array is 20 and can be increased by changing the maxpars parameter in `reactions/src/BeyondLCDM.h`.

**Note** For any models that want to include some sort of environmental screening or dependence in the spherical collapse, one also needs to add their model to the if statement at line ~634 of `reactions/src/SCOL.cpp` in the `myscol` function which gives the initial guess for the collapse density which can depend on the environment. Any model that makes use of the $p_2$ parameter (see model 13 above for example) will need to be added to this if statement for example.


The functions one should consider when adding in a new models are as follows:

### A) Basic functions to edit for new models
Expand Down
11 changes: 6 additions & 5 deletions reactions/src/SCOL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -630,15 +630,16 @@ double SCOL::myscol(double myscolparams[], double acol, double omegacb, double o

double mydelta;

if (model == 1 || model == 9) {
// take standard guess if GR collapse
mydelta = DELTA1/acol;
}
else{
// Add in model to this OR set if it uses environmental screening!
if (model == 2 || model == 7 || model == 10 || model == 12 || model == 13) {
// If modified gravity is active, set initial condition for SC to 10% higher than y_{env,initial} if we need to use y_env in spherical collapse as in f(R)
// This guess allows us to solve for extreme cases (e.g. fr0=10^{-4}, m_nu>0.3eV).
mydelta = m/d*1.1/acol;
}
else{
// take standard guess if GR collapse
mydelta = DELTA1/acol;
}

UserData data;
data = (UserData) malloc(sizeof(struct usdat)); /* Allocate data memory */
Expand Down