MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <math.h>
#include <gsl/gsl_integration.h>
#include <gsl/gsl_errno.h>
#include <gsl/gsl_odeiv2.h>
#include "cosmology.h"
#include "physconst.h"
#include "utils.h"
Go to the source code of this file.
Classes | |
struct | sigma2_params |
Macros | |
#define | STEFAN_BOLTZMANN 5.670373e-5 |
Functions | |
static double | OmegaFLD (const Cosmology *CP, const double a) |
void | init_cosmology (Cosmology *CP, const double TimeBegin, const struct UnitSystem units) |
int | hybrid_nu_tracer (const Cosmology *CP, double atime) |
double | hubble_function (const Cosmology *CP, double a) |
static double | growth (Cosmology *CP, double a, double *dDda) |
double | GrowthFactor (Cosmology *CP, double astart, double aend) |
int | growth_ode (double a, const double yy[], double dyda[], void *params) |
double | F_Omega (Cosmology *CP, double a) |
static double | sigma2_int (double k, void *p) |
double | function_of_k_eval (FunctionOfK *fk, double k) |
double | function_of_k_tophat_sigma (FunctionOfK *fk, double R) |
void | function_of_k_normalize_sigma (FunctionOfK *fk, double R, double sigma) |
void | check_units (const Cosmology *CP, const struct UnitSystem units) |
#define STEFAN_BOLTZMANN 5.670373e-5 |
Definition at line 11 of file cosmology.c.
void check_units | ( | const Cosmology * | CP, |
const struct UnitSystem | units | ||
) |
Check and print properties of the cosmological unit system.
Definition at line 260 of file cosmology.c.
References CP, endrun(), get_omega_nu(), Cosmology::GravInternal, Cosmology::Hubble, Cosmology::HubbleParam, Cosmology::MassiveNuLinRespOn, message(), Cosmology::Omega0, Cosmology::Omega_fld, Cosmology::OmegaBaryon, Cosmology::OmegaCDM, Cosmology::OmegaG, Cosmology::OmegaK, Cosmology::OmegaLambda, Cosmology::ONu, Cosmology::RadiationOn, UnitSystem::UnitDensity_in_cgs, UnitSystem::UnitEnergy_in_cgs, UnitSystem::UnitLength_in_cm, UnitSystem::UnitMass_in_g, UnitSystem::UnitTime_in_s, and UnitSystem::UnitVelocity_in_cm_per_s.
Referenced by begrun().
double F_Omega | ( | Cosmology * | CP, |
double | a | ||
) |
Definition at line 148 of file cosmology.c.
Referenced by displacement_fields(), test_cosmology(), and test_growth_numerical().
double function_of_k_eval | ( | FunctionOfK * | fk, |
double | k | ||
) |
Definition at line 191 of file cosmology.c.
References sigma2_params::fk, FunctionOfK::k, FunctionOfK::Pk, FunctionOfK::size, and FunctionOfK::table.
Referenced by sigma2_int().
void function_of_k_normalize_sigma | ( | FunctionOfK * | fk, |
double | R, | ||
double | sigma | ||
) |
Definition at line 249 of file cosmology.c.
References sigma2_params::fk, function_of_k_tophat_sigma(), FunctionOfK::Pk, sigma2_params::R, sigma, FunctionOfK::size, and FunctionOfK::table.
double function_of_k_tophat_sigma | ( | FunctionOfK * | fk, |
double | R | ||
) |
Definition at line 233 of file cosmology.c.
References sigma2_params::fk, sigma2_params::R, and sigma2_int().
Referenced by function_of_k_normalize_sigma().
|
static |
The growth function is given as a 2nd order DE in Peacock 1999, Cosmological Physics. D'' + a'/a D' - 1.5 * (a'/a)^2 D = 0 1/a (a D')' - 1.5 (a'/a)^2 D where ' is d/d tau = a^2 H d/da Define F = a^3 H dD/da and we have: dF/da = 1.5 a H D
Definition at line 111 of file cosmology.c.
References CP, endrun(), get_omega_nu(), growth_ode(), Cosmology::Hubble, hubble_function(), Cosmology::OmegaBaryon, Cosmology::OmegaCDM, Cosmology::OmegaG, Cosmology::ONu, and Cosmology::RadiationOn.
Referenced by F_Omega(), and GrowthFactor().
int growth_ode | ( | double | a, |
const double | yy[], | ||
double | dyda[], | ||
void * | params | ||
) |
Definition at line 87 of file cosmology.c.
References CP, Cosmology::Hubble, hubble_function(), Cosmology::OmegaBaryon, and Cosmology::OmegaCDM.
Referenced by growth().
double GrowthFactor | ( | Cosmology * | CP, |
double | astart, | ||
double | aend | ||
) |
Definition at line 82 of file cosmology.c.
Referenced by gravpm_force(), init_powerspectrum(), print_spec(), and test_cosmology().
double hubble_function | ( | const Cosmology * | CP, |
double | a | ||
) |
Definition at line 58 of file cosmology.c.
References CP, get_omega_nu(), Cosmology::Hubble, Cosmology::Omega_ur, Cosmology::OmegaBaryon, Cosmology::OmegaCDM, OmegaFLD(), Cosmology::OmegaG, Cosmology::OmegaK, Cosmology::OmegaLambda, Cosmology::ONu, and Cosmology::RadiationOn.
Referenced by atime_integ(), blackhole(), cooling_and_starformation(), displacement_fields(), drift_integ(), find_timesteps(), fof_save_particles(), fof_write_header(), fslength_int(), get_delta_nu(), get_delta_nu_int(), get_long_range_timestep_dloga(), gravkick_integ(), growth(), growth_ode(), hydro_force(), hydrokick_integ(), init_transfer_table(), kernel(), petaio_read_snapshot(), petaio_save_snapshot(), petaio_write_header(), and test_cosmology().
int hybrid_nu_tracer | ( | const Cosmology * | CP, |
double | atime | ||
) |
Definition at line 53 of file cosmology.c.
References CP, Cosmology::HybridNeutrinosOn, and Cosmology::HybridNuPartTime.
Referenced by run(), runfof(), and runpower().
void init_cosmology | ( | Cosmology * | CP, |
const double | TimeBegin, | ||
const struct UnitSystem | units | ||
) |
Definition at line 15 of file cosmology.c.
References Cosmology::CMBTemperature, CP, get_omega_nu(), Cosmology::GravInternal, GRAVITY, Cosmology::Hubble, HUBBLE, Cosmology::HubbleParam, _omega_nu::hybnu, Cosmology::HybridNeutrinosOn, Cosmology::HybridNuPartTime, Cosmology::HybridVcrit, init_hybrid_nu(), init_omega_nu(), _omega_nu::kBtnu, LIGHTCGS, Cosmology::MNu, Cosmology::Omega0, Cosmology::OmegaBaryon, Cosmology::OmegaCDM, Cosmology::OmegaG, Cosmology::OmegaK, Cosmology::OmegaLambda, Cosmology::ONu, STEFAN_BOLTZMANN, UnitSystem::UnitLength_in_cm, UnitSystem::UnitMass_in_g, Cosmology::UnitTime_in_s, and UnitSystem::UnitTime_in_s.
Referenced by begrun(), do_density_test(), do_force_test(), main(), setup(), and setup_cosmology().
|
inlinestatic |
Definition at line 158 of file cosmology.c.
References CP, Cosmology::Omega_fld, Cosmology::w0_fld, and Cosmology::wa_fld.
Referenced by hubble_function().
|
static |
Definition at line 171 of file cosmology.c.
References sigma2_params::fk, function_of_k_eval(), and sigma2_params::R.
Referenced by function_of_k_tophat_sigma().