-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsigointegratorsDM.hh
108 lines (73 loc) · 2.44 KB
/
sigointegratorsDM.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
#include "sigofunctionsDM.hh"
double Int_rhoS(double kmin, double kmax, double MEFF, int calls){
gsl_function RhoScalar;
RhoScalar.function = &rhoS;
RhoScalar.params = &MEFF;
gsl_integration_workspace *WR = gsl_integration_workspace_alloc(calls);
double relerr=1e-7;
double RHOSC = 0;
double RHOERR = 0;
gsl_integration_qags(&RhoScalar, kmin, kmax, 0., relerr, calls, WR, &RHOSC, &RHOERR);
gsl_integration_workspace_free(WR);
return RHOSC;
}
double Int_Ekinetic(double kmin, double kmax, double mst, int calls){
gsl_function EK;
EK.function = &EKIN;
EK.params = &mst;
gsl_integration_workspace * WE = gsl_integration_workspace_alloc(calls);
double relerr0 = 1e-7;
double EKin = 0;
double EKinERR = 0;
gsl_integration_qags(&EK, kmin, kmax, 0., relerr0, calls, WE, &EKin, &EKinERR);
gsl_integration_workspace_free(WE);
return EKin;
}
double Int_eye1(double kmin, double kmax, int calls){
gsl_function EYE1;
EYE1.function = &I1;
EYE1.params = &mstar;
gsl_integration_workspace * WEYE = gsl_integration_workspace_alloc(calls);
double relerr0 = 1e-7;
double Ione = 0;
double Ioneerr = 0;
gsl_integration_qags(&EYE1, kmin, kmax, 0., relerr0, calls, WEYE, &Ione, &Ioneerr);
gsl_integration_workspace_free(WEYE);
return Ione;
}
double Int_pee1(double kmin, double kmax, int calls){
gsl_function PEE1;
PEE1.function = &P1;
PEE1.params = &mstar;
gsl_integration_workspace * WPEE = gsl_integration_workspace_alloc(calls);
double relerr0 = 1e-7;
double Pone = 0;
double Poneerr = 0;
gsl_integration_qags(&PEE1, kmin, kmax, 0., relerr0, calls, WPEE, &Pone, &Poneerr);
gsl_integration_workspace_free(WPEE);
return Pone;
}
double Int_eye2(double kmin, double kmax, int calls){
gsl_function EYE2;
EYE2.function = &I2;
EYE2.params = &mstar;
gsl_integration_workspace * WEYE = gsl_integration_workspace_alloc(calls);
double relerr0 = 1e-7;
double Itwo = 0;
double Itwoerr = 0;
gsl_integration_qags(&EYE2, kmin, kmax, 0., relerr0, calls, WEYE, &Itwo, &Itwoerr);
gsl_integration_workspace_free(WEYE);
return Itwo;
}
double Int_eye3(double kmin, double kmax, int calls){
gsl_function EYE3;
EYE3.function = &I3;
EYE3.params = &mstar;
gsl_integration_workspace * WEYE = gsl_integration_workspace_alloc(calls);
double relerr0 = 1e-7;
double Ithree = 0;
double Ithreeerr = 0;
gsl_integration_qags(&EYE3, kmin, kmax, 0., relerr0, calls, WEYE, &Ithree, &Ithreeerr);
gsl_integration_workspace_free(WEYE);
return Ithree;
}