10 #include <gsl/gsl_integration.h>
26 hubble_a +=
CP->
Omega0 / (a * a * a);
28 hubble_a += 5.045e-5*(1+7./8.*pow(pow(4/11.,1/3.)*1.00328,4)*3) / (a * a * a * a);
30 hubble_a = 0.1 * sqrt(hubble_a);
47 return 1 / (h * pow(a,ff->
exp));
54 return log(
AMIN) + ti * logDTime;
61 return (log(aa) - log(
AMIN))/logDTime;
66 double result, abserr;
68 gsl_integration_workspace *workspace;
69 workspace = gsl_integration_workspace_alloc(10000);
73 gsl_integration_qag(&F, a1,a2, 0, 1.0e-8, 10000, GSL_INTEG_GAUSS61, workspace, &result, &abserr);
74 gsl_integration_workspace_free(workspace);
110 const struct CMUnitTest tests[] = {
113 return cmocka_run_group_tests_mpi(tests, NULL, NULL);
void test_drift_factor(void **state)
double loga_from_ti(int ti)
double exact_drift_factor(Cosmology *CP, double a1, double a2, int exp)
double hubble_function(const Cosmology *CP, double a)
static int get_ti(double aa)
double fac_integ(double a, void *param)
double get_exact_hydrokick_factor(Cosmology *CP, inttime_t ti0, inttime_t ti1)
double get_exact_drift_factor(Cosmology *CP, inttime_t ti0, inttime_t ti1)
double get_exact_gravkick_factor(Cosmology *CP, inttime_t ti0, inttime_t ti1)