Conversation
theory/modgrav.c
Outdated
| double cs_sqrd = -(cs_term1 + cs_term2)/(H*H*alpha); | ||
| return cs_sqrd; | ||
| } | ||
| double horndeski_alpha(double a, double fz){ |
There was a problem hiding this comment.
This function could be declared inline, which may help speed things up very slightly.
theory/modgrav.c
Outdated
| double alpha_M = cosmology.MGalpha_M*fz; | ||
|
|
||
| double alpha = horndeski_alpha(a, fz); | ||
| double cs_term1 = (2.-alpha_B)*(Hprime - (alpha_M -alpha_T)*H*H-H*H*alpha_B/(2.*(1.+alpha_T))); |
There was a problem hiding this comment.
There seems to be a common factor of H*H for the last two terms. Is there any reason why they're broken apart?
(Also, why the weird indent?)
| //this is all in the quasistatic limit!! | ||
| //given by Eqn 43 in Tessa Baker notes | ||
| //!!!!currently assuming Mpl = Mstar!!!! | ||
| double fz = omegav/hub*1./cosmology.Omega_v; |
There was a problem hiding this comment.
Can you add a comment saying how this is defined, please? We might want to use a different definition at some point, so good to be clear what this is.
theory/cosmo2D_fourier.c
Outdated
| } | ||
| double W_kappa(double a, double fK, double nz){ | ||
| double wkappa = 1.5*cosmology.Omega_m*fK/a*g_tomo(a,(int)nz); | ||
| double aa=a*a; |
There was a problem hiding this comment.
Probably don't need to define this separately, as aa is only used once.
theory/cosmo2D_fourier.c
Outdated
| double omegav=omv_vareos(a); | ||
| double hub = hoverh0(a); | ||
| hub = hub*hub; | ||
| if(cosmology.MGSigma != 0.){ |
There was a problem hiding this comment.
This can be enclosed in a preprocessor macro.
theory/cosmo3D.c
Outdated
| @@ -99,7 +99,10 @@ int func_for_growfac(double a,const double y[],double f[],void *params) | |||
| hub = hub*hub; | |||
| f[0]=y[1]; | |||
| if(cosmology.MGmu != 0){ | |||
There was a problem hiding this comment.
This can also be enclosed in preprocessor macros (IFDEF etc).
There was a problem hiding this comment.
Why would you use ifdef instead of define here?
…grav parameters are non-zero but the modgrav flag is not added to the compiler directions
…to run alpha_T != 0, so we want alpha_K = 1 always.
This allows the horndeski analysis to take place. @philbull does this all look good to you?