CLASSpp Manual
Cosmology reference and developer manual
Loading...
Searching...
No Matches
transfer.h File Reference
#include <string>
#include <vector>
#include "hyperspherical.h"
#include "nonlinear.h"

Go to the source code of this file.

Data Structures

struct  transfers
 
struct  transfer_workspace
 

Enumerations

enum  radial_function_type
 

Detailed Description

Input data and shared types for transfer functions.


Data Structure Documentation

◆ transfers

struct transfers

Input parameters for transfer functions.

Computed transfer-function tables belong to TransferModule; this structure holds the shared configuration read by InputModule.

Data Fields
double lcmb_rescale = 1.

normally set to one, can be used exceptionally to rescale by hand the CMB lensing potential

double lcmb_tilt = 0.

normally set to zero, can be used exceptionally to tilt by hand the CMB lensing potential

double lcmb_pivot = 0.1

if lcmb_tilt non-zero, corresponding pivot scale

double selection_bias[_SELECTION_NUM_MAX_]

light-to-mass bias; element [0] default 1, rest 0

double selection_magnification_bias[_SELECTION_NUM_MAX_]

magnification bias; default 0

bool has_nz_file = false

Has dN/dz (selection function) input file?

bool has_nz_analytic

Use analytic form for dN/dz (selection function) distribution?

string nz_file_name

dN/dz (selection function) input file name

bool has_nz_evo_file = false

Has dN/dz (evolution function) input file?

bool has_nz_evo_analytic

Use analytic form for dN/dz (evolution function) distribution?

string nz_evo_file_name

dN/dz (evolution function) input file name

bool initialise_HIS_cache

only true if we are using CLASS for setting up a cache of HIS structures

short transfer_verbose

flag regulating the amount of information sent to standard output (none if set to zero)

◆ transfer_workspace

struct transfer_workspace

Structure containing all the quantities that each thread needs to know for computing transfer functions (but that can be forgotten once the transfer functions are known, otherwise they would be stored in the transfer module)

Data Fields
HyperInterpStruct HIS

structure containing all hyperspherical bessel functions (flat case) or all hyperspherical bessel functions for a given value of beta=q/sqrt(|K|) (non-flat case). HIS = Hyperspherical Interpolation Structure.

HyperInterpStruct * pBIS

pointer to structure containing all the spherical bessel functions of the flat case (used even in the non-flat case, for approximation schemes). pBIS = pointer to Bessel Interpolation Structure.

int l_size

number of l values

int tau_size

number of discrete time values for a given type

int tau_size_max

maximum number of discrete time values for all types

vector< double > interpolated_sources

interpolated_sources[index_tau]: sources interpolated from the perturbation module at the right value of k

vector< double > sources

sources[index_tau]: sources used in transfer module, possibly differing from those in the perturbation module by some resampling or rescaling

vector< double > tau0_minus_tau

tau0_minus_tau[index_tau]: values of (tau0 - tau)

vector< double > w_trapz

w_trapz[index_tau]: values of weights in trapezoidal integration (related to time steps)

vector< double > chi

chi[index_tau]: value of argument of bessel function: k(tau0-tau) (flat case) or sqrt(|K|)(tau0-tau) (non-flat case)

vector< double > cscKgen

cscKgen[index_tau]: useful trigonometric function

vector< double > cotKgen

cotKgen[index_tau]: useful trigonometric function

vector< double > Phi

Pre-allocated temporary buffers for transfer_radial_function and transfer_integrate. Size tau_size_max. Avoids repeated malloc/free in the hot per-(k,l) loop. Phi[index_tau]: Bessel function values

vector< double > dPhi

dPhi[index_tau]: first derivative of Bessel function

vector< double > d2Phi

d2Phi[index_tau]: second derivative of Bessel function

vector< double > chireverse

chireverse[index_tau]: reversed chi grid

vector< double > rescale_function

rescale_function[index_tau]: amplitude rescaling

vector< double > radial_function

radial_function[index_tau]: output of transfer_radial_function

vector< double > chi_full_reverse

workspace: reversed chi array

double K

curvature parameter (see background module for details)

int sgnK

0 (flat), 1 (positive curvature, spherical, closed), -1 (negative curvature, hyperbolic, open)

double tau0_minus_tau_cut

critical value of (tau0-tau) in time cut approximation for the wavenumber at hand

short neglect_late_source

flag stating whether we use the time cut approximation for the wavenumber at hand

Enumeration Type Documentation

◆ radial_function_type

enumeration of possible source types. This looks redundant with respect to the definition of indices index_tt_... This definition is however convenient and time-saving: it allows to use a "case" statement in transfer_radial_function()