6 #include <gsl/gsl_math.h>
7 #include <gsl/gsl_integration.h>
14 #define WORKSIZE 10000
21 return 1 / (h * a * a * a);
30 return 1 / (h * a * a);
48 double result, abserr;
54 gsl_integration_workspace *workspace;
55 workspace = gsl_integration_workspace_alloc(
WORKSIZE);
58 gsl_integration_qag(&F, a0, a1, 0, 1.0e-8,
WORKSIZE, GSL_INTEG_GAUSS61, workspace, &result, &abserr);
59 gsl_integration_workspace_free(workspace);
double hubble_function(const Cosmology *CP, double a)
double loga_from_ti(int ti)
static double drift_integ(double a, void *param)
double get_exact_hydrokick_factor(Cosmology *CP, inttime_t ti0, inttime_t ti1)
static double gravkick_integ(double a, void *param)
double get_exact_drift_factor(Cosmology *CP, inttime_t ti0, inttime_t ti1)
static double hydrokick_integ(double a, void *param)
double get_exact_gravkick_factor(Cosmology *CP, inttime_t ti0, inttime_t ti1)
static double get_exact_factor(Cosmology *CP, inttime_t t0, inttime_t t1, double(*factor)(double, void *))