MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <math.h>
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <gsl/gsl_sf_hyperg.h>
#include <libgadget/physconst.h>
#include <libgadget/cosmology.h>
#include "stub.h"
Go to the source code of this file.
Functions | |
void | init_omega_nu (_omega_nu *const omnu, const double MNu[], const double a0, const double HubbleParam, const double tcmb0) |
double | get_omega_nu (const _omega_nu *omnu, const double a) |
double | get_omega_nu_nopart (const _omega_nu *omnu, const double a) |
void | init_hybrid_nu (_hybrid_nu *const hybnu, const double mnu[], const double vcrit, const double light, const double nu_crit_time, const double kBtnu) |
void | setup_cosmology (Cosmology *CP, double Omega0, double OmegaBaryon, double H0) |
static double | radgrow (double aa, double omegar) |
static double | growth (double aa, double omegam) |
static void | test_cosmology (void **state) |
int | main (void) |
double get_omega_nu | ( | const _omega_nu *const | omnu, |
const double | a | ||
) |
Return the total matter density in neutrinos at scale factor a.
Definition at line 19 of file test_cosmology.c.
double get_omega_nu_nopart | ( | const _omega_nu *const | omnu, |
const double | a | ||
) |
Return the total matter density in neutrinos at scale factor a , excluding active particles.
Definition at line 23 of file test_cosmology.c.
|
inlinestatic |
Definition at line 53 of file test_cosmology.c.
Referenced by test_cosmology().
void init_hybrid_nu | ( | _hybrid_nu *const | hybnu, |
const double | mnu[], | ||
const double | vcrit, | ||
const double | light, | ||
const double | nu_crit_time, | ||
const double | kBtnu | ||
) |
Set up parameters for the hybrid neutrinos
hybnu | initialised structure |
mnu | array of neutrino masses in eV |
vcrit | Critical velocity above which to treat neutrinos with particles. Note this is unperturbed velocity TODAY To get velocity at redshift z, multiply by (1+z) |
light | speed of light in internal units |
nu_crit_time | critical time to make neutrino particles live |
kBtnu | Boltzmann constant times neutrino temperature. Dimensionful factor. |
Definition at line 28 of file test_cosmology.c.
void init_omega_nu | ( | _omega_nu *const | omnu, |
const double | MNu[], | ||
const double | a0, | ||
const double | HubbleParam, | ||
const double | tcmb0 | ||
) |
Initialise the neutrino structure, do the time integration and allocate memory for the subclass rho_nu_single
omnu | structure to initialise |
MNu | array of neutrino masses in eV. Three entries. |
a0 | initial scale factor. |
HubbleParam | Hubble parameter h0, eg, 0.7. |
tcmb0 | Redshift zero CMB temperature. |
Definition at line 17 of file test_cosmology.c.
int main | ( | void | ) |
Definition at line 96 of file test_cosmology.c.
References test_cosmology().
|
inlinestatic |
Definition at line 48 of file test_cosmology.c.
Referenced by test_cosmology().
void setup_cosmology | ( | Cosmology * | CP, |
double | Omega0, | ||
double | OmegaBaryon, | ||
double | H0 | ||
) |
Definition at line 30 of file test_cosmology.c.
References Cosmology::CMBTemperature, CP, get_unitsystem(), Cosmology::HubbleParam, init_cosmology(), Cosmology::MNu, Cosmology::Omega0, Cosmology::Omega_fld, Cosmology::Omega_ur, Cosmology::OmegaBaryon, Cosmology::OmegaLambda, Cosmology::RadiationOn, Cosmology::w0_fld, and Cosmology::wa_fld.
Referenced by test_cosmology().
|
static |
Definition at line 58 of file test_cosmology.c.
References CP, F_Omega(), growth(), GrowthFactor(), Cosmology::Hubble, hubble_function(), Cosmology::OmegaG, Cosmology::OmegaK, radgrow(), Cosmology::RadiationOn, and setup_cosmology().
Referenced by main().