real(dl)
cached_grow(z, cosm)
The growth factor, using the value cached by fill_plintab where possible
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
cosmic_density(cosm)
The z = 0 cosmological matter density
HM_cosmology intent(in) :: cosm
real(dl)
dc_Mead(z, cosm)
delta_c fitting function from Mead (2017; 1606.05345)
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
distance_error(obj, w)
Fractional difference between the comoving distance from a_z to a_star in a model with
constant dark energy equation of state w and the same distance in the actual model
class(*) :: obj
real(dl) intent(in) :: w
real(dl)
dtauda_wconst(obj, a)
d tau/d a for a model with constant dark energy equation of state, and all other
densities as in the actual model. Agrees with dtauda to the last bit when w is the
actual (constant) equation of state.
class(*) :: obj
real(dl) intent(in) :: a
real(dl)
Dv_Mead(z, cosm)
Delta_v fitting function from Mead (2017; 1606.05345)
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
f_Mead(x, y, p0, p1, p2, p3)
Equation A3 in Mead (2017)
real(dl) intent(in) :: x
real(dl) intent(in) :: y
real(dl) intent(in) :: p0
real(dl) intent(in) :: p1
real(dl) intent(in) :: p2
real(dl) intent(in) :: p3
real(dl)
f_star(lut, cosm)
HM_tables intent(in) :: lut
HM_cosmology intent(in) :: cosm
real(dl)
fd(v)
d'=f(d) in ODE solver
real(dl) intent(in) :: v
real(dl)
find(n, x, xtab, ytab, iorder, ifind, imeth)
Given two arrays x and y this routine interpolates to find the y_i value at position x_i
integer intent(in) :: n
real(dl) intent(in) :: x
real(dl) intent(in) :: xtab(n)
real(dl) intent(in) :: ytab(n)
integer intent(in) :: iorder
integer intent(in) :: ifind
integer intent(in) :: imeth
real(dl)
find_pk(k, itype, cosm)
Look-up and interpolation for P(k,z=0)
real(dl) intent(in) :: k
integer intent(in) :: itype
HM_cosmology intent(in) :: cosm
real(dl)
fv(d, v, a, cosm)
v'=f(v) in ODE solver
real(dl) intent(in) :: d
real(dl) intent(in) :: v
real(dl) intent(in) :: a
HM_cosmology intent(in) :: cosm
real(dl)
gnu(nu)
Select the mass function
real(dl) intent(in) :: nu
real(dl)
grow(z, cosm)
Finds the scale-independent growth function at redshift z
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
growint(z, cosm)
Approximate growth function from integrating Omega_m(a)^gamma dln(a) up to a = 1
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
growint_integrand(a, y, z, itype, cosm)
Integrand for the approximate growth integral
y, z and itype are unused, but are needed to match the integrate() interface
real(dl) intent(in) :: a
real(dl) intent(in) :: y
real(dl) intent(in) :: z
integer intent(in) :: itype
HM_cosmology intent(in) :: cosm
real(dl)
gst(nu)
Sheth & Tormen (1999) mass function!
real(dl) intent(in) :: nu
logical
HM_par_inner()
The loops over redshift are the outermost parallel regions, and give much better scaling than
the small regions used to set up each redshift. Those inner regions are therefore only used
when the redshift loop is not itself running in parallel (e.g. for a single redshift).
$ use omp_lib, only: omp_in_parallel
real(dl)
Hubble2(z, cosm)
This calculates the dimensionless squared hubble parameter at redshift z (H/H_0)^2!
Ignores contributions from radiation (not accurate at high z, but consistent with simulations)!
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
integer
int_split(n, x, xtab)
Finds the position of the value in the table by continually splitting it in half
integer intent(in) :: n
real(dl) intent(in) :: x
real(dl) intent(in) :: xtab(n)
real(dl)
integrate(a, b, y, z, itype, cosm, acc, iorder, f)
Integrates between a and b until desired accuracy is reached
Stores information to reduce function calls
real(dl) intent(in) :: a
real(dl) intent(in) :: b
real(dl) intent(in) :: y
real(dl) intent(in) :: z
integer intent(in) :: itype
HM_cosmology intent(in) :: cosm
real(dl) intent(in) :: acc
integer intent(in) :: iorder
function :: f(x, y, z, itype, cosm)
real(dl)
inttab(n1, n2, x, y, iorder)
Integrates tables y(x)dx
integer intent(in) :: n1
integer intent(in) :: n2
real(dl) intent(in) :: x(:)
real(dl) intent(in) :: y(:)
integer intent(in) :: iorder
real(dl)
Lagrange_polynomial(n, x, xv, yv)
Computes the result of the nth order Lagrange polynomial at point x, L(x)
integer intent(in) :: n
real(dl) intent(in) :: x
real(dl) intent(in) :: xv(n + 1)
real(dl) intent(in) :: yv(n + 1)
integer
linear_table_integer(n, x, xtab)
Assuming the table is exactly linear this gives you the integer position
Clamped because the tabulated points can differ from the exactly equally spaced
values by a last bit, which could otherwise put x in a neighbouring cell
integer intent(in) :: n
real(dl) intent(in) :: x
real(dl) intent(in) :: xtab(n)
real(dl)
m_baryon(lut, cosm)
HM_tables intent(in) :: lut
HM_cosmology intent(in) :: cosm
real(dl)
mass(c)
This calculates the (normalised) mass of a halo of concentration c
The 'normalised' mass is that divided by the prefactor r_s^3 4*pi rho_n
where rho_n is the profile normalisation [i.e, rho=rho_n/((r/r_s)*(1. + r/r_s)^2]
real(dl) intent(in) :: c
real(dl)
neff(cosm, lut)
Finds the effective spectral index at the collapse scale r_nl, where nu(r_nl) = 1.
HM_cosmology intent(in) :: cosm
HM_tables intent(in) :: lut
real(dl)
neff_integrand(t, R, z, itype, cosm)
This is the integrand for the velocity dispersion integral
real(dl) intent(in) :: t
real(dl) intent(in) :: R
real(dl) intent(in) :: z
integer intent(in) :: itype
HM_cosmology intent(in) :: cosm
real(dl)
Omega_cold_hm(z, cosm)
This calculates omega_cold variations with z (no neutrinos)
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
Omega_m_hm(z, cosm)
This calculates omega_m variations with z!
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
p_dewiggle(k, z, p_linear, sigv, cosm)
Call the dewiggled power spectrum, which is linear but with damped wiggles
real(dl) intent(in) :: k
real(dl) intent(in) :: z
real(dl) intent(in) :: p_linear
real(dl) intent(in) :: sigv
HM_cosmology intent(in) :: cosm
real(dl)
p_lin(itype, cosm)
Looks up the value for the linear power spectrum
integer intent(in) :: itype
HM_cosmology intent(in) :: cosm
real(dl)
Pk_nowiggle(k, s, alpha, cosm)
Calculates the un-normalised no-wiggle power spectrum
Comes from the Eisenstein & Hu approximation
real(dl) intent(in) :: k
real(dl) intent(in) :: s k-independent parameters from Tk_nw_init
real(dl) intent(in) :: alpha k-independent parameters from Tk_nw_init
HM_cosmology intent(in) :: cosm
real(dl)
r_nl(lut)
Calculates R_nl, defined by nu(R_nl) = 1., nu = dc/sigma(R)
HM_tables intent(in) :: lut
real(dl)
radius_m(m, cosm)
Calculates the co-moving radius that encloses a mass 'm' in the homogeneous Universe
real(dl) intent(in) :: m
HM_cosmology intent(in) :: cosm
real(dl)
sigma_integral(r, z, itype, cosm)
Gets sigma(R)
real(dl) intent(in) :: r
real(dl) intent(in) :: z
integer intent(in) :: itype
HM_cosmology intent(in) :: cosm
real(dl)
sigma_integrand(t, R, z, itype, cosm)
The integrand for the sigma(R) integrals
real(dl) intent(in) :: t
real(dl) intent(in) :: R
real(dl) intent(in) :: z
integer intent(in) :: itype
HM_cosmology intent(in) :: cosm
real(dl)
sigma_lut(r, z, cosm)
Finds sigma_cold(R) from look-up table
real(dl) intent(in) :: r
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
sigmaV(R, z, itype, cosm)
real(dl) intent(in) :: R
real(dl) intent(in) :: z
integer intent(in) :: itype
HM_cosmology intent(in) :: cosm
real(dl)
sigmaV_integrand(t, R, z, itype, cosm)
This is the integrand for the velocity dispersion integral
real(dl) intent(in) :: t
real(dl) intent(in) :: R
real(dl) intent(in) :: z
integer intent(in) :: itype
HM_cosmology intent(in) :: cosm
integer
table_integer(n, x, xtab, imeth)
Chooses between ways to find the integer location below some value in an array
find() only calls this for x inside the table, and both methods clamp anyway
integer intent(in) :: n
real(dl) intent(in) :: x
real(dl) intent(in) :: xtab(n)
integer intent(in) :: imeth
real(dl)
Tcb_Tcbnu_ratio(k, z, cosm)
Calculates the ratio of T(k) for cold vs. all matter
Uses approximations in Eisenstein & Hu (1999; arXiv 9710252)
Note that this assumes that there are exactly 3 species of neutrinos with
Nnu<=3 of these being massive, and with the mass split evenly between the number of massive species.
real(dl) intent(in) :: k
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
Tk_nw(k, s, alpha, cosm)
No-wiggle transfer function from Eisenstein & Hu: astro-ph:9709112
real(dl) intent(in) :: k Wavenumber [h/Mpc]
real(dl) intent(in) :: s k-independent parameters from Tk_nw_init
real(dl) intent(in) :: alpha k-independent parameters from Tk_nw_init
HM_cosmology intent(in) :: cosm
real(dl)
w_de_hm(z, cosm)
The dark energy w(a) function
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm
real(dl)
win(k, rv, c)
Selects the halo window function (k-space halo profile)
real(dl) intent(in) :: k
real(dl) intent(in) :: rv
real(dl) intent(in) :: c
real(dl)
winnfw(k, rv, c)
The analytic Fourier Transform of the NFW profile; note W(k->0) = 1
real(dl) intent(in) :: k
real(dl) intent(in) :: rv
real(dl) intent(in) :: c
real(dl)
wk_tophat(x)
The normlaised Fourier Transform of a top-hat
real(dl) intent(in) :: x
real(dl)
wk_tophat_deriv(x)
The derivative of a normlaised Fourier Transform of a spherical top-hat
real(dl) intent(in) :: x
real(dl)
X_de(z, cosm)
The time evolution for dark energy: rho_de = rho_de,0 * X(a)
X(a) = 1 for LCDM but changes for other models
real(dl) intent(in) :: z
HM_cosmology intent(in) :: cosm