diff --git a/README.md b/README.md index 915f1d7..403d282 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/reactions/src/SCOL.cpp b/reactions/src/SCOL.cpp index 0e2a225..8c81e60 100755 --- a/reactions/src/SCOL.cpp +++ b/reactions/src/SCOL.cpp @@ -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 */