CCL
Data Structures | Macros | Typedefs | Functions
ccl_core.h File Reference
#include "gsl/gsl_spline.h"
#include "gsl/gsl_interp2d.h"
#include "gsl/gsl_spline2d.h"
#include "ccl_config.h"
#include "ccl_constants.h"
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  ccl_parameters
 
struct  ccl_data
 
struct  ccl_cosmology
 

Macros

#define EXPAND_STR(s)   STRING(s)
 
#define STRING(s)   #s
 

Typedefs

typedef struct ccl_parameters ccl_parameters
 
typedef struct ccl_data ccl_data
 
typedef struct ccl_cosmology ccl_cosmology
 

Functions

void ccl_cosmology_read_config (void)
 
ccl_cosmologyccl_cosmology_create (ccl_parameters params, ccl_configuration config)
 
ccl_cosmologyccl_cosmology_create_with_params (double Omega_c, double Omega_b, double Omega_k, double N_nu_rel, double N_nu_mass, double mnu, double w0, double wa, double h, double norm_pk, double n_s, int nz_mgrowth, double *zarr_mgrowth, double *dfarr_mgrowth, ccl_configuration config, int *status)
 
ccl_cosmologyccl_cosmology_create_with_lcdm_params (double Omega_c, double Omega_b, double Omega_k, double h, double norm_pk, double n_s, ccl_configuration config, int *status)
 
ccl_parameters ccl_parameters_create (double Omega_c, double Omega_b, double Omega_k, double N_nu_rel, double N_nu_mass, double mnu, double w0, double wa, double h, double norm_pk, double n_s, int nz_mgrowth, double *zarr_mgrowth, double *dfarr_mgrowth, int *status)
 
ccl_parameters ccl_parameters_create_flat_lcdm (double Omega_c, double Omega_b, double h, double norm_pk, double n_s, int *status)
 
ccl_parameters ccl_parameters_create_flat_wcdm (double Omega_c, double Omega_b, double w0, double h, double norm_pk, double n_s, int *status)
 
ccl_parameters ccl_parameters_create_flat_wacdm (double Omega_c, double Omega_b, double w0, double wa, double h, double norm_pk, double n_s, int *status)
 
ccl_parameters ccl_parameters_create_lcdm (double Omega_c, double Omega_b, double Omega_k, double h, double norm_pk, double n_s, int *status)
 
ccl_parameters ccl_parameters_create_flat_lcdm_nu (double Omega_c, double Omega_b, double h, double norm_pk, double n_s, double N_nu_rel, double N_nu_mass, double mnu, int *status)
 
ccl_parameters ccl_parameters_create_flat_wcdm_nu (double Omega_c, double Omega_b, double w0, double h, double norm_pk, double n_s, double N_nu_rel, double N_nu_mass, double mnu, int *status)
 
ccl_parameters ccl_parameters_create_flat_wacdm_nu (double Omega_c, double Omega_b, double w0, double wa, double h, double norm_pk, double n_s, double N_nu_rel, double N_nu_mass, double mnu, int *status)
 
ccl_parameters ccl_parameters_create_lcdm_nu (double Omega_c, double Omega_b, double Omega_k, double h, double norm_pk, double n_s, double N_nu_rel, double N_nu_mass, double mnu, int *status)
 
void ccl_cosmology_free (ccl_cosmology *cosmo)
 
void ccl_cosmology_compute_distances (ccl_cosmology *cosmo, int *status)
 
void ccl_cosmology_compute_growth (ccl_cosmology *cosmo, int *status)
 
void ccl_cosmology_compute_power (ccl_cosmology *cosmo, int *status)
 

Macro Definition Documentation

◆ EXPAND_STR

#define EXPAND_STR (   s)    STRING(s)

◆ STRING

#define STRING (   s)    #s

Typedef Documentation

◆ ccl_cosmology

typedef struct ccl_cosmology ccl_cosmology

Sturct containing references to instances of the above structs, and boolean flags of precomputed values.

◆ ccl_data

typedef struct ccl_data ccl_data

Struct containing references to gsl splines for distance and acceleration calculations

◆ ccl_parameters

Struct containing the parameters defining a cosmology

Function Documentation

◆ ccl_cosmology_compute_distances()

void ccl_cosmology_compute_distances ( ccl_cosmology cosmo,
int *  status 
)

Compute comoving distances and spline to be stored in the cosmology structure.

Parameters
cosmoCosmological parameters
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
void

◆ ccl_cosmology_compute_growth()

void ccl_cosmology_compute_growth ( ccl_cosmology cosmo,
int *  status 
)

Compute the growth function and a spline to be stored in the cosmology structure.

Parameters
cosmoCosmological parameters
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
void

◆ ccl_cosmology_compute_power()

void ccl_cosmology_compute_power ( ccl_cosmology cosmo,
int *  status 
)

Compute the power spectrum and create a 2d spline P(k,z) to be stored in the cosmology structure.

Parameters
cosmoCosmological parameters
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
void

◆ ccl_cosmology_create()

ccl_cosmology* ccl_cosmology_create ( ccl_parameters  params,
ccl_configuration  config 
)

◆ ccl_cosmology_create_with_lcdm_params()

ccl_cosmology* ccl_cosmology_create_with_lcdm_params ( double  Omega_c,
double  Omega_b,
double  Omega_k,
double  h,
double  norm_pk,
double  n_s,
ccl_configuration  config,
int *  status 
)

◆ ccl_cosmology_create_with_params()

ccl_cosmology* ccl_cosmology_create_with_params ( double  Omega_c,
double  Omega_b,
double  Omega_k,
double  N_nu_rel,
double  N_nu_mass,
double  mnu,
double  w0,
double  wa,
double  h,
double  norm_pk,
double  n_s,
int  nz_mgrowth,
double *  zarr_mgrowth,
double *  dfarr_mgrowth,
ccl_configuration  config,
int *  status 
)

◆ ccl_cosmology_free()

void ccl_cosmology_free ( ccl_cosmology cosmo)

Free a cosmology struct

Parameters
cosmoCosmological parameters
Returns
void

◆ ccl_cosmology_read_config()

void ccl_cosmology_read_config ( void  )

◆ ccl_parameters_create()

ccl_parameters ccl_parameters_create ( double  Omega_c,
double  Omega_b,
double  Omega_k,
double  N_nu_rel,
double  N_nu_mass,
double  mnu,
double  w0,
double  wa,
double  h,
double  norm_pk,
double  n_s,
int  nz_mgrowth,
double *  zarr_mgrowth,
double *  dfarr_mgrowth,
int *  status 
)

Create a cosmology

Parameters
Omega_cOmega_c
Omega_bOmega_b
Omega_kOmega_k
N_nu_relNumber of relativisitic species
N_nu_massN_nu_mass
mnuneutrino mass
w0Dark energy EoS parameter
waDark energy EoS parameter
hHubble constant in units of 100 km/s/Mpc
norm_pkthe normalization of the power spectrum, either A_s or sigma_8
n_sthe power-law index of the power spectrum
nz_mgrowththe number of redshifts where the modified growth is provided
zarr_mgrowththe array of redshifts where the modified growth is provided
dfarr_mgrowththe modified growth function vector provided
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
void

◆ ccl_parameters_create_flat_lcdm()

ccl_parameters ccl_parameters_create_flat_lcdm ( double  Omega_c,
double  Omega_b,
double  h,
double  norm_pk,
double  n_s,
int *  status 
)

Create a flat LCDM cosmology

Parameters
Omega_cOmega_c
Omega_bOmega_b
hHubble constant in units of 100 km/s/Mpc
norm_pkthe normalization of the power spectrum, either A_s or sigma_8
n_sthe power-law index of the power spectrum
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
void

◆ ccl_parameters_create_flat_lcdm_nu()

ccl_parameters ccl_parameters_create_flat_lcdm_nu ( double  Omega_c,
double  Omega_b,
double  h,
double  norm_pk,
double  n_s,
double  N_nu_rel,
double  N_nu_mass,
double  mnu,
int *  status 
)

◆ ccl_parameters_create_flat_wacdm()

ccl_parameters ccl_parameters_create_flat_wacdm ( double  Omega_c,
double  Omega_b,
double  w0,
double  wa,
double  h,
double  norm_pk,
double  n_s,
int *  status 
)

Create a flat waCDM cosmology

Parameters
Omega_cOmega_c
Omega_bOmega_b
w0Dark energy EoS parameter
waDark energy EoS parameter
hHubble constant in units of 100 km/s/Mpc
norm_pkthe normalization of the power spectrum, either A_s or sigma_8
n_sthe power-law index of the power spectrum
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
void

◆ ccl_parameters_create_flat_wacdm_nu()

ccl_parameters ccl_parameters_create_flat_wacdm_nu ( double  Omega_c,
double  Omega_b,
double  w0,
double  wa,
double  h,
double  norm_pk,
double  n_s,
double  N_nu_rel,
double  N_nu_mass,
double  mnu,
int *  status 
)

◆ ccl_parameters_create_flat_wcdm()

ccl_parameters ccl_parameters_create_flat_wcdm ( double  Omega_c,
double  Omega_b,
double  w0,
double  h,
double  norm_pk,
double  n_s,
int *  status 
)

Create a flat wCDM cosmology

Parameters
Omega_cOmega_c
Omega_bOmega_b
w0Dark energy EoS parameter
hHubble constant in units of 100 km/s/Mpc
norm_pkthe normalization of the power spectrum, either A_s or sigma_8
n_sthe power-law index of the power spectrum
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
void

◆ ccl_parameters_create_flat_wcdm_nu()

ccl_parameters ccl_parameters_create_flat_wcdm_nu ( double  Omega_c,
double  Omega_b,
double  w0,
double  h,
double  norm_pk,
double  n_s,
double  N_nu_rel,
double  N_nu_mass,
double  mnu,
int *  status 
)

◆ ccl_parameters_create_lcdm()

ccl_parameters ccl_parameters_create_lcdm ( double  Omega_c,
double  Omega_b,
double  Omega_k,
double  h,
double  norm_pk,
double  n_s,
int *  status 
)

Create an LCDM cosmology with curvature

Parameters
Omega_cOmega_c
Omega_bOmega_b
Omega_kOmega_k
w0Dark energy EoS parameter
waDark energy EoS parameter
hHubble constant in units of 100 km/s/Mpc
norm_pkthe normalization of the power spectrum, either A_s or sigma_8
n_sthe power-law index of the power spectrum
statusStatus flag. 0 if there are no errors, nonzero otherwise. For specific cases see documentation for ccl_error.c
Returns
void

◆ ccl_parameters_create_lcdm_nu()

ccl_parameters ccl_parameters_create_lcdm_nu ( double  Omega_c,
double  Omega_b,
double  Omega_k,
double  h,
double  norm_pk,
double  n_s,
double  N_nu_rel,
double  N_nu_mass,
double  mnu,
int *  status 
)