15 double pk=csm_Pk_linear_0(p->
par->
cpar,k);
25 double result=0,eresult;
27 gsl_integration_workspace *
w=gsl_integration_workspace_alloc(1000);
34 gsl_integration_qag(&F,
D_LKMIN,
D_LKMAX,0,1E-4,1000,GSL_INTEG_GAUSS41,w,&result,&eresult);
35 gsl_integration_workspace_free(w);
37 return M_LN10*2*result/(2*l+1.);
42 printf(
"Computing power spectra\n");
44 #pragma omp parallel default(none) shared(par) 51 for(l=0;l<=par->
lmax;l++) {
99 double cl=p->
cl[(int)l];
103 jbes=gsl_sf_bessel_Jn(p->
i_bessel,x);
105 jbes=gsl_sf_bessel_J0(x);
113 #pragma omp parallel default(none) \ 114 shared(par,cl,wt,llist,bessel_order) 118 double result,eresult;
120 gsl_integration_workspace *
w=gsl_integration_workspace_alloc(1000);
132 for(ith=0;ith<par->
n_th;ith++) {
139 gsl_integration_qag(&F,llist[0],llist[par->
lmax],0,1E-4,1000,GSL_INTEG_GAUSS41,w,&result,&eresult);
140 wt[ith]=result/(2*
M_PI);
142 gsl_integration_workspace_free(w);
155 printf(
"Computing correlation functions\n");
158 for(l=0;l<=par->
lmax;l++)
190 printf(
"Skipping correlation functions\n");
static void compute_wt_single(RunParams *par, double *cl, double *wt, double *llist, int bessel_order)
static double cl_integrand(double lk, void *params)
SplPar * spline_init(int n, double *x, double *y, double y0, double yf)
static double spectra(char *tr1, char *tr2, int l, RunParams *par)
static CCL_BEGIN_DECLS double x[111][8]
void compute_spectra(RunParams *par)
void * dam_malloc(size_t size)
static double wt_integrand(double l, void *params)
void spline_free(SplPar *spl)
float pow(float base, unsigned long int exp)
static double transfer_wrap(int il, double lk, ccl_cosmology *cosmo, CCL_ClWorkspace *w, CCL_ClTracer *clt, int *status)
static double w[2][28][111]
void compute_w_theta(RunParams *par)