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

Go to the source code of this file.

Data Structures

struct  nonlinear
 
struct  nonlinear_workspace
 
struct  nonlinear_time_workspace
 

Macros

#define _M_EV_TOO_BIG_FOR_HALOFIT_    10.
 
#define _M_SUN_   1.98841e30
 

Enumerations

enum  source_extrapolation { }
 
enum class  HMcodeVersion
 

Detailed Description

Input data and shared types for nonlinear corrections.


Data Structure Documentation

◆ nonlinear

struct nonlinear

Input parameters for nonlinear corrections.

Computed nonlinear spectra belong to NonlinearModule; this structure holds the shared configuration read by InputModule.

Data Fields
enum non_linear_method method

method for computing non-linear corrections (none, Halogit, etc.)

enum source_extrapolation extrapolation_method

method for analytical extrapolation of sources beyond pre-computed range; extrap_max_scaled until 2026-10-21

enum hmcode_baryonic_feedback_model feedback
double c_min

to choose between different baryonic feedback models in hmcode (dmonly, gas cooling, Agn or supernova feedback)

double eta_0 = 0.0

for HMcode: minimum concentration in Bullock 2001 mass-concentration relation

double z_infinity

for HMcode: halo bloating parameter

HMcodeVersion hmcode_version

for HMcode: z value at which Dark Energy correction is evaluated; should be at early times (default: 10.)

double log10T_heat_hmcode

HMcode version: 2016 (Mead et al. 2016) or 2020 (Mead et al. 2021), with or without baryonic feedback

int nk_wiggle

for HMcode 2020 with baryonic feedback: log10 of the AGN heating temperature in K

bool has_pk_eq = false

for HMcode 2020: number of wavenumbers on which the linear spectrum is split into wiggle and no-wiggle parts flag: will we use the pk_eq method?

short nonlinear_verbose = 0

amount of information written in standard output

◆ nonlinear_workspace

struct nonlinear_workspace

Structure containing variables used only internally in nonlinear module by various functions. It is filled before the loop over time and only read inside it, where the times are shared among threads; what changes with time is in nonlinear_time_workspace.

Data Fields
vector< double > growtable
vector< double > ztable
vector< double > tautable
double dark_energy_correction
vector< double > a_norad

this is the ratio [g(z_infinity)/g_lcdm(z_infinity)]^1.5 for HMcode 2016 (power from Dolag et al. (2004) as in Mead et al. 2016) and g(z_infinity)/g_lcdm(z_infinity) for 2020, with g_lcdm the growth of a flat LCDM with the same Omega_m, in every cosmology. For 2020, g is the growth of the cosmology without radiation below HMcode 2020: linear growth in the cosmology without radiation of Mead et al. (2021), on a_norad (logarithmic in a). Columns of growth_norad: g/a, the integral of g/a over a, Omega_m(a); their splines in a are in dd_growth_norad. g_norad is g normalised to 1 today.

vector< double > growth_norad
vector< double > dd_growth_norad
vector< double > g_norad
vector< double > dd_g_norad

spline of g_norad(a)

vector< double > dd_a_norad

spline of a(g_norad), to find formation times

vector< double > ln_pk_eh

HMcode 2020: no-wiggle reference spectrum of Eisenstein & Hu on the extended k grid (ln P and its spline in ln k), and the Gaussian weights of the smoothing in ln k

vector< double > dd_ln_pk_eh
vector< double > smoothing_weights

nk_wiggle x nk_wiggle, rows normalised; empty rows are not smoothed

vector< double > lnk_wiggle

HMcode 2020: wavenumbers of the wiggle/no-wiggle split

◆ nonlinear_time_workspace

struct nonlinear_time_workspace

The HMcode tables of one time, filled and read while the non-linear correction is computed at that time: one per thread.

Data Fields
vector< double > rtab
vector< double > stab

List of R values

vector< double > ddstab

List of Sigma Values

vector< double > pk_wiggle

Splined sigma HMcode 2020: wiggle part of the linear spectrum, as a dimensionless spectrum k^3/(2 pi^2) P_wiggle, on nonlinear_workspace::lnk_wiggle

vector< double > ddpk_wiggle

Macro Definition Documentation

◆ _M_EV_TOO_BIG_FOR_HALOFIT_

#define _M_EV_TOO_BIG_FOR_HALOFIT_    10.

above which value of non-CDM mass (in eV) do we stop trusting halofit?

◆ _M_SUN_

#define _M_SUN_   1.98841e30

Solar mass in Kg: IAU 2015 nominal GM_sun over G

Enumeration Type Documentation

◆ source_extrapolation

Enumerator
extrap_asymptotic 

A ln k + B + C/k fitted over [k_max/3, k_max] (AsymptoticExtrapolation)

◆ HMcodeVersion

enum class HMcodeVersion
strong

HMcode versions. v2020_unfitted is the halo model without the fitted parameters, used internally by the baryonic feedback response of 2020 (Mead et al. 2021, arXiv:2009.01858).