CCL: /home/chisarie/Documents/lsst_ccl/CCL/include/ccl_core.h File Reference

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_cosmology * | ccl_cosmology_create (ccl_parameters params, ccl_configuration config)
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 * | 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_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

typedef struct ccl_parameters 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

  cosmo | Cosmological parameters
  status | Status 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

  cosmo | Cosmological parameters
  status | Status 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

  cosmo | Cosmological parameters
  status | Status 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

  cosmo | Cosmological 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_c | Omega_c
  Omega_b | Omega_b
  Omega_k | Omega_k
  N_nu_rel | Number of relativisitic species
  N_nu_mass | N_nu_mass
  mnu | neutrino mass
  w0 | Dark energy EoS parameter
  wa | Dark energy EoS parameter
  h | Hubble constant in units of 100 km/s/Mpc
  norm_pk | the normalization of the power spectrum, either A_s or sigma_8
  n_s | the power-law index of the power spectrum
  nz_mgrowth | the number of redshifts where the modified growth is provided
  zarr_mgrowth | the array of redshifts where the modified growth is provided
  dfarr_mgrowth | the modified growth function vector provided
  status | Status 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_c | Omega_c
  Omega_b | Omega_b
  h | Hubble constant in units of 100 km/s/Mpc
  norm_pk | the normalization of the power spectrum, either A_s or sigma_8
  n_s | the power-law index of the power spectrum
  status | Status 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_c | Omega_c
  Omega_b | Omega_b
  w0 | Dark energy EoS parameter
  wa | Dark energy EoS parameter
  h | Hubble constant in units of 100 km/s/Mpc
  norm_pk | the normalization of the power spectrum, either A_s or sigma_8
  n_s | the power-law index of the power spectrum
  status | Status 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_c | Omega_c
  Omega_b | Omega_b
  w0 | Dark energy EoS parameter
  h | Hubble constant in units of 100 km/s/Mpc
  norm_pk | the normalization of the power spectrum, either A_s or sigma_8
  n_s | the power-law index of the power spectrum
  status | Status 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_c | Omega_c
  Omega_b | Omega_b
  Omega_k | Omega_k
  w0 | Dark energy EoS parameter
  wa | Dark energy EoS parameter
  h | Hubble constant in units of 100 km/s/Mpc
  norm_pk | the normalization of the power spectrum, either A_s or sigma_8
  n_s | the power-law index of the power spectrum
  status | Status 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
| ) |  |