MP-Gadget
5.0.1.dev1-76bc7d4726-dirty
|
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include "../neutrinos_lra.h"
#include "../omega_nu_single.h"
#include "../physconst.h"
#include "../utils/endrun.h"
#include "stub.h"
Go to the source code of this file.
Macros | |
#define | T_CMB0 2.7255 |
Functions | |
double | specialJ (const double x, const double vcmnubylight, const double nufrac_low) |
double | fslength (Cosmology *CP, const double logai, const double logaf, const double light) |
void | petaio_save_block (BigFile *bf, char *blockname, BigArray *array, int verbose) |
int | petaio_read_block (BigFile *bf, char *blockname, BigArray *array, int required) |
void | setup_cosmology (Cosmology *CP, double MNu[]) |
static void | test_allocate_delta_tot_table (void **state) |
static void | test_specialJ (void **state) |
static void | test_fslength (void **state) |
int | main (void) |
Variables | |
_delta_tot_table | delta_tot_table |
#define T_CMB0 2.7255 |
Definition at line 14 of file test_neutrinos_lra.c.
double fslength | ( | Cosmology * | CP, |
const double | logai, | ||
const double | logaf, | ||
const double | light | ||
) |
Free-streaming length (times Mnu/k_BT_nu, which is dimensionless) for a non-relativistic particle of momentum q = T0, from scale factor ai to af. Arguments:
logai | log of initial scale factor |
logaf | log of final scale factor |
mnu | Neutrino mass in eV |
light | speed of light in internal length units. |
Definition at line 553 of file neutrinos_lra.c.
References CP, fslength_int(), and GSL_VAL.
Referenced by get_delta_nu(), and test_fslength().
int main | ( | void | ) |
Definition at line 110 of file test_neutrinos_lra.c.
References test_allocate_delta_tot_table(), test_fslength(), and test_specialJ().
int petaio_read_block | ( | BigFile * | bf, |
char * | blockname, | ||
BigArray * | array, | ||
int | required | ||
) |
Definition at line 20 of file test_neutrinos_lra.c.
void petaio_save_block | ( | BigFile * | bf, |
char * | blockname, | ||
BigArray * | array, | ||
int | verbose | ||
) |
Definition at line 19 of file test_neutrinos_lra.c.
void setup_cosmology | ( | Cosmology * | CP, |
double | MNu[] | ||
) |
Definition at line 29 of file test_neutrinos_lra.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, and Cosmology::RadiationOn.
Referenced by test_fslength().
double specialJ | ( | const double | x, |
const double | vcmnubylight, | ||
const double | nufrac_low | ||
) |
Fit to the special function J(x) that is accurate to better than 3% relative and 0.07% absolute
Definition at line 616 of file neutrinos_lra.c.
Referenced by get_delta_nu(), get_delta_nu_int(), and test_specialJ().
|
static |
Definition at line 49 of file test_neutrinos_lra.c.
References _delta_tot_table::delta_nu_init, _delta_tot_table::delta_tot, delta_tot_table, _delta_tot_table::ia, init_neutrinos_lra(), init_omega_nu(), _delta_tot_table::namax, _delta_tot_table::nk_allocated, _delta_tot_table::scalefact, and T_CMB0.
Referenced by main().
|
static |
Definition at line 95 of file test_neutrinos_lra.c.
References BOLEVK, CP, fslength(), setup_cosmology(), T_CMB0, and TNUCMB.
Referenced by main().
|
static |
Definition at line 67 of file test_neutrinos_lra.c.
References specialJ().
Referenced by main().
|
extern |
Definition at line 75 of file neutrinos_lra.c.
Referenced by delta_nu_from_power(), init_neutrinos_lra(), petaio_read_neutrinos(), petaio_save_neutrinos(), powerspectrum_nu_save(), and test_allocate_delta_tot_table().