1#ifndef SPECTRA_MODULE_H
2#define SPECTRA_MODULE_H
8#include "acoustic_spline.h"
9#include "base_module.h"
12class SpectraModule :
public BaseModule {
14 SpectraModule(InputModulePtr input_module,
15 PerturbationsModulePtr perturbations_module,
16 PrimordialModulePtr primordial_module_,
17 NonlinearModulePtr nonlinear_module,
18 TransferModulePtr transfer_module);
20 void spectra_cl_at_l(
double l,
double* cl,
double** cl_md,
double** cl_md_ic)
const;
21 std::map<std::string, int> cl_output_index_map()
const;
22 std::map<std::string, std::vector<double>> cl_output(
int lmax)
const;
23 void cl_output_no_copy(
int lmax, std::vector<double*>& output_pointers)
const;
33 std::vector<std::vector<bool>>
55 int index_ct_tt_ = -1;
56 int index_ct_ee_ = -1;
57 int index_ct_te_ = -1;
58 int index_ct_bb_ = -1;
59 int index_ct_pp_ = -1;
60 int index_ct_tp_ = -1;
61 int index_ct_ep_ = -1;
64 int index_ct_td_ = -1;
65 int index_ct_pd_ = -1;
68 int index_ct_tl_ = -1;
69 int index_ct_dl_ = -1;
76 std::vector<double> l_;
77 std::vector<std::vector<int>> l_max_ct_;
82 std::vector<int> l_max_;
95 double acoustic_omega_ = 0.;
100 void spectra_acoustic_at_l(
int index_md,
double l,
double* row)
const;
102 void spectra_indices();
104 void spectra_compute_cl(
int index_md,
108 int cl_integrand_num_columns,
109 double* cl_integrand,
110 const double* primordial_pk_cached,
111 const double* integration_weights,
112 const double* limber_integration_weights,
113 double* transfer_ic1,
114 double* transfer_ic2);
116 PerturbationsModulePtr perturbations_module_;
117 PrimordialModulePtr primordial_module_;
118 NonlinearModulePtr nonlinear_module_;
119 TransferModulePtr transfer_module_;
121 int index_md_scalars_ = -1;
130 std::vector<std::vector<double>>
132 std::vector<std::vector<double>>
136 std::vector<std::vector<std::pair<int, AcousticSpline>>> acoustic_;